jass-vue 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/lib/jass/vue/version.rb +1 -1
  3. data/lib/jass/vue.rb +1 -0
  4. data/vendor/node_modules/balanced-match/index.js +59 -0
  5. data/vendor/node_modules/balanced-match/package.json +49 -0
  6. data/vendor/node_modules/brace-expansion/index.js +201 -0
  7. data/vendor/node_modules/brace-expansion/package.json +47 -0
  8. data/vendor/node_modules/concat-map/index.js +13 -0
  9. data/vendor/node_modules/concat-map/package.json +43 -0
  10. data/vendor/node_modules/minimatch/minimatch.js +923 -0
  11. data/vendor/node_modules/minimatch/package.json +30 -0
  12. data/vendor/node_modules/rollup-plugin-replace/dist/rollup-plugin-replace.cjs.js +88 -0
  13. data/vendor/node_modules/rollup-plugin-replace/dist/rollup-plugin-replace.es.js +84 -0
  14. data/vendor/node_modules/rollup-plugin-replace/node_modules/estree-walker/dist/estree-walker.es.js +57 -0
  15. data/vendor/node_modules/rollup-plugin-replace/node_modules/estree-walker/dist/estree-walker.umd.js +68 -0
  16. data/vendor/node_modules/rollup-plugin-replace/node_modules/estree-walker/index.d.ts +17 -0
  17. data/vendor/node_modules/rollup-plugin-replace/node_modules/estree-walker/package.json +35 -0
  18. data/vendor/node_modules/rollup-plugin-replace/node_modules/estree-walker/src/estree-walker.js +51 -0
  19. data/vendor/node_modules/rollup-plugin-replace/node_modules/magic-string/dist/magic-string.cjs.js +1300 -0
  20. data/vendor/node_modules/rollup-plugin-replace/node_modules/magic-string/dist/magic-string.es.js +1296 -0
  21. data/vendor/node_modules/rollup-plugin-replace/node_modules/magic-string/dist/magic-string.umd.js +1352 -0
  22. data/vendor/node_modules/rollup-plugin-replace/node_modules/magic-string/index.d.ts +83 -0
  23. data/vendor/node_modules/rollup-plugin-replace/node_modules/magic-string/package.json +55 -0
  24. data/vendor/node_modules/rollup-plugin-replace/node_modules/rollup-pluginutils/dist/pluginutils.cjs.js +302 -0
  25. data/vendor/node_modules/rollup-plugin-replace/node_modules/rollup-pluginutils/dist/pluginutils.es.js +292 -0
  26. data/vendor/node_modules/rollup-plugin-replace/node_modules/rollup-pluginutils/package.json +46 -0
  27. data/vendor/node_modules/rollup-plugin-replace/node_modules/rollup-pluginutils/src/addExtension.js +6 -0
  28. data/vendor/node_modules/rollup-plugin-replace/node_modules/rollup-pluginutils/src/attachScopes.js +155 -0
  29. data/vendor/node_modules/rollup-plugin-replace/node_modules/rollup-pluginutils/src/createFilter.js +33 -0
  30. data/vendor/node_modules/rollup-plugin-replace/node_modules/rollup-pluginutils/src/dataToEsm.js +69 -0
  31. data/vendor/node_modules/rollup-plugin-replace/node_modules/rollup-pluginutils/src/index.js +5 -0
  32. data/vendor/node_modules/rollup-plugin-replace/node_modules/rollup-pluginutils/src/makeLegalIdentifier.js +15 -0
  33. data/vendor/node_modules/rollup-plugin-replace/node_modules/rollup-pluginutils/src/utils/ensureArray.js +5 -0
  34. data/vendor/node_modules/rollup-plugin-replace/package.json +43 -0
  35. data/vendor/node_modules/rollup-plugin-replace/src/index.js +80 -0
  36. data/vendor/package.json +1 -0
  37. data/vendor/yarn.lock +47 -1
  38. metadata +36 -4
@@ -0,0 +1,83 @@
1
+ export interface BundleOptions {
2
+ intro?: string;
3
+ separator?: string;
4
+ }
5
+
6
+ export interface SourceMapOptions {
7
+ hires: boolean;
8
+ file: string;
9
+ source: string;
10
+ includeContent: boolean;
11
+ }
12
+
13
+ export interface SourceMap {
14
+ version: string;
15
+ file: string;
16
+ sources: string[];
17
+ sourcesContent: string[];
18
+ names: string[];
19
+ mappings: string;
20
+
21
+ toString(): string;
22
+ toUrl(): string;
23
+ }
24
+
25
+ export class Bundle {
26
+ constructor(options?: BundleOptions);
27
+ addSource(source: MagicString | { filename?: string, content: MagicString }): Bundle;
28
+ append(str: string, options?: BundleOptions): Bundle;
29
+ clone(): Bundle;
30
+ generateMap(options?: Partial<SourceMapOptions>): SourceMap;
31
+ getIndentString(): string;
32
+ indent(indentStr?: string): Bundle;
33
+ indentExclusionRanges: ExclusionRange | Array<ExclusionRange>;
34
+ prepend(str: string): Bundle;
35
+ toString(): string;
36
+ trimLines(): Bundle;
37
+ trim(charType?: string): Bundle;
38
+ trimStart(charType?: string): Bundle;
39
+ trimEnd(charType?: string): Bundle;
40
+ }
41
+
42
+ export type ExclusionRange = [ number, number ];
43
+
44
+ export interface MagicStringOptions {
45
+ filename: string,
46
+ indentExclusionRanges: ExclusionRange | Array<ExclusionRange>;
47
+ }
48
+
49
+ export interface IndentOptions {
50
+ exclude: ExclusionRange | Array<ExclusionRange>;
51
+ indentStart: boolean;
52
+ }
53
+
54
+ export interface OverwriteOptions {
55
+ storeName?: boolean;
56
+ contentOnly?: boolean;
57
+ }
58
+
59
+ export default class MagicString {
60
+ constructor(str: string, options?: MagicStringOptions);
61
+ addSourcemapLocation(char: number): void;
62
+ append(content: string): MagicString;
63
+ appendLeft(index: number, content: string): MagicString;
64
+ appendRight(index: number, content: string): MagicString;
65
+ clone(): MagicString;
66
+ generateMap(options?: Partial<SourceMapOptions>): SourceMap;
67
+ getIndentString(): string;
68
+
69
+ indent(options?: IndentOptions): MagicString;
70
+ indent(indentStr?: string, options?: IndentOptions): MagicString;
71
+ indentExclusionRanges: ExclusionRange | Array<ExclusionRange>;
72
+
73
+ move(start: number, end: number, index: number): MagicString;
74
+ overwrite(start: number, end: number, content: string, options?: boolean | OverwriteOptions): MagicString;
75
+ prepend(content: string): MagicString;
76
+ prependLeft(index: number, content: string): MagicString;
77
+ prependRight(index: number, content: string): MagicString;
78
+ remove(start: number, end: number): MagicString;
79
+ slice(start: number, end: number): string;
80
+ snip(start: number, end: number): MagicString;
81
+
82
+ original: string;
83
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "magic-string",
3
+ "description": "Modify strings, generate sourcemaps",
4
+ "author": "Rich Harris",
5
+ "version": "0.22.5",
6
+ "repository": "https://github.com/rich-harris/magic-string",
7
+ "main": "dist/magic-string.cjs.js",
8
+ "module": "dist/magic-string.es.js",
9
+ "jsnext:main": "dist/magic-string.es.js",
10
+ "typings": "index.d.ts",
11
+ "license": "MIT",
12
+ "dependencies": {
13
+ "vlq": "^0.2.2"
14
+ },
15
+ "devDependencies": {
16
+ "buble": "^0.15.2",
17
+ "codecov.io": "^0.1.6",
18
+ "console-group": "^0.3.3",
19
+ "eslint": "^4.5.0",
20
+ "istanbul": "^0.4.5",
21
+ "mocha": "^3.5.0",
22
+ "remap-istanbul": "^0.9.5",
23
+ "resolve": "^1.4.0",
24
+ "rollup": "^0.48.0",
25
+ "rollup-plugin-buble": "^0.15.0",
26
+ "rollup-plugin-node-resolve": "^3.0.0",
27
+ "rollup-plugin-replace": "^1.1.1",
28
+ "source-map": "^0.5.6",
29
+ "source-map-support": "^0.4.16"
30
+ },
31
+ "keywords": [
32
+ "string",
33
+ "string manipulation",
34
+ "sourcemap",
35
+ "templating",
36
+ "transpilation"
37
+ ],
38
+ "scripts": {
39
+ "test": "mocha",
40
+ "pretest": "npm run build",
41
+ "pretest-coverage": "npm run build",
42
+ "test-coverage": "rm -rf coverage/* && istanbul cover --report json node_modules/.bin/_mocha -- -u exports -R spec test/*.js",
43
+ "posttest-coverage": "remap-istanbul -i coverage/coverage-final.json -o coverage/coverage-remapped.json -b dist && remap-istanbul -i coverage/coverage-final.json -o coverage/coverage-remapped.lcov -t lcovonly -b dist && remap-istanbul -i coverage/coverage-final.json -o coverage/coverage-remapped -t html -b dist",
44
+ "ci": "npm run test-coverage && codecov < coverage/coverage-remapped.lcov",
45
+ "build": "rollup -c",
46
+ "prepublish": "rm -rf dist && npm test",
47
+ "lint": "eslint src test",
48
+ "watch": "rollup -cw"
49
+ },
50
+ "files": [
51
+ "dist/*",
52
+ "index.d.ts",
53
+ "README.md"
54
+ ]
55
+ }
@@ -0,0 +1,302 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
6
+
7
+ var path = require('path');
8
+ var estreeWalker = require('estree-walker');
9
+ var mm = _interopDefault(require('micromatch'));
10
+
11
+ function addExtension ( filename, ext ) {
12
+ if ( ext === void 0 ) ext = '.js';
13
+
14
+ if ( !path.extname( filename ) ) { filename += ext; }
15
+ return filename;
16
+ }
17
+
18
+ var blockDeclarations = {
19
+ 'const': true,
20
+ 'let': true
21
+ };
22
+
23
+ var extractors = {
24
+ Literal: function Literal ( names, param ) {
25
+ names.push( param.value );
26
+ },
27
+
28
+ Identifier: function Identifier ( names, param ) {
29
+ names.push( param.name );
30
+ },
31
+
32
+ ObjectPattern: function ObjectPattern ( names, param ) {
33
+ param.properties.forEach( function (prop) {
34
+ if ( prop.type === 'RestElement' ) {
35
+ extractors.RestElement( names, prop );
36
+ } else {
37
+ extractors[ (prop.value || prop.key).type ]( names, prop.value || prop.key );
38
+ }
39
+ });
40
+ },
41
+
42
+ ArrayPattern: function ArrayPattern ( names, param ) {
43
+ param.elements.forEach( function (element) {
44
+ if ( element ) { extractors[ element.type ]( names, element ); }
45
+ });
46
+ },
47
+
48
+ RestElement: function RestElement ( names, param ) {
49
+ extractors[ param.argument.type ]( names, param.argument );
50
+ },
51
+
52
+ AssignmentPattern: function AssignmentPattern ( names, param ) {
53
+ return extractors[ param.left.type ]( names, param.left );
54
+ }
55
+ };
56
+
57
+ function extractNames ( param ) {
58
+ var names = [];
59
+
60
+ extractors[ param.type ]( names, param );
61
+ return names;
62
+ }
63
+
64
+ var Scope = function Scope ( options ) {
65
+ var this$1 = this;
66
+
67
+ options = options || {};
68
+
69
+ this.parent = options.parent;
70
+ this.isBlockScope = !!options.block;
71
+
72
+ this.declarations = Object.create( null );
73
+
74
+ if ( options.params ) {
75
+ options.params.forEach( function (param) {
76
+ extractNames( param ).forEach( function (name) {
77
+ this$1.declarations[ name ] = true;
78
+ });
79
+ });
80
+ }
81
+ };
82
+
83
+ Scope.prototype.addDeclaration = function addDeclaration ( node, isBlockDeclaration, isVar ) {
84
+ var this$1 = this;
85
+
86
+ if ( !isBlockDeclaration && this.isBlockScope ) {
87
+ // it's a `var` or function node, and this
88
+ // is a block scope, so we need to go up
89
+ this.parent.addDeclaration( node, isBlockDeclaration, isVar );
90
+ } else if ( node.id ) {
91
+ extractNames( node.id ).forEach( function (name) {
92
+ this$1.declarations[ name ] = true;
93
+ });
94
+ }
95
+ };
96
+
97
+ Scope.prototype.contains = function contains ( name ) {
98
+ return this.declarations[ name ] ||
99
+ ( this.parent ? this.parent.contains( name ) : false );
100
+ };
101
+
102
+
103
+ function attachScopes ( ast, propertyName ) {
104
+ if ( propertyName === void 0 ) propertyName = 'scope';
105
+
106
+ var scope = new Scope();
107
+
108
+ estreeWalker.walk( ast, {
109
+ enter: function enter ( node, parent ) {
110
+ // function foo () {...}
111
+ // class Foo {...}
112
+ if ( /(Function|Class)Declaration/.test( node.type ) ) {
113
+ scope.addDeclaration( node, false, false );
114
+ }
115
+
116
+ // var foo = 1
117
+ if ( node.type === 'VariableDeclaration' ) {
118
+ var isBlockDeclaration = blockDeclarations[ node.kind ];
119
+
120
+ node.declarations.forEach( function (declaration) {
121
+ scope.addDeclaration( declaration, isBlockDeclaration, true );
122
+ });
123
+ }
124
+
125
+ var newScope;
126
+
127
+ // create new function scope
128
+ if ( /Function/.test( node.type ) ) {
129
+ newScope = new Scope({
130
+ parent: scope,
131
+ block: false,
132
+ params: node.params
133
+ });
134
+
135
+ // named function expressions - the name is considered
136
+ // part of the function's scope
137
+ if ( node.type === 'FunctionExpression' && node.id ) {
138
+ newScope.addDeclaration( node, false, false );
139
+ }
140
+ }
141
+
142
+ // create new block scope
143
+ if ( node.type === 'BlockStatement' && !/Function/.test( parent.type ) ) {
144
+ newScope = new Scope({
145
+ parent: scope,
146
+ block: true
147
+ });
148
+ }
149
+
150
+ // catch clause has its own block scope
151
+ if ( node.type === 'CatchClause' ) {
152
+ newScope = new Scope({
153
+ parent: scope,
154
+ params: [ node.param ],
155
+ block: true
156
+ });
157
+ }
158
+
159
+ if ( newScope ) {
160
+ Object.defineProperty( node, propertyName, {
161
+ value: newScope,
162
+ configurable: true
163
+ });
164
+
165
+ scope = newScope;
166
+ }
167
+ },
168
+ leave: function leave ( node ) {
169
+ if ( node[ propertyName ] ) { scope = scope.parent; }
170
+ }
171
+ });
172
+
173
+ return scope;
174
+ }
175
+
176
+ function ensureArray ( thing ) {
177
+ if ( Array.isArray( thing ) ) { return thing; }
178
+ if ( thing == undefined ) { return []; }
179
+ return [ thing ];
180
+ }
181
+
182
+ function createFilter ( include, exclude ) {
183
+ var getMatcher = function (id) { return ( isRegexp( id ) ? id : { test: mm.matcher( path.resolve( id ) ) } ); };
184
+ include = ensureArray( include ).map( getMatcher );
185
+ exclude = ensureArray( exclude ).map( getMatcher );
186
+
187
+ return function ( id ) {
188
+
189
+ if ( typeof id !== 'string' ) { return false; }
190
+ if ( /\0/.test( id ) ) { return false; }
191
+
192
+ id = id.split( path.sep ).join( '/' );
193
+
194
+ for ( var i = 0; i < exclude.length; ++i ) {
195
+ var matcher = exclude[i];
196
+ if ( matcher.test( id ) ) { return false; }
197
+ }
198
+
199
+ for ( var i$1 = 0; i$1 < include.length; ++i$1 ) {
200
+ var matcher$1 = include[i$1];
201
+ if ( matcher$1.test( id ) ) { return true; }
202
+ }
203
+
204
+ return !include.length;
205
+ };
206
+ }
207
+
208
+ function isRegexp ( val ) {
209
+ return val instanceof RegExp;
210
+ }
211
+
212
+ var reservedWords = 'break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public'.split( ' ' );
213
+ var builtins = 'arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl'.split( ' ' );
214
+
215
+ var blacklisted = Object.create( null );
216
+ reservedWords.concat( builtins ).forEach( function (word) { return blacklisted[ word ] = true; } );
217
+
218
+ function makeLegalIdentifier ( str ) {
219
+ str = str
220
+ .replace( /-(\w)/g, function ( _, letter ) { return letter.toUpperCase(); } )
221
+ .replace( /[^$_a-zA-Z0-9]/g, '_' );
222
+
223
+ if ( /\d/.test( str[0] ) || blacklisted[ str ] ) { str = "_" + str; }
224
+
225
+ return str;
226
+ }
227
+
228
+ function serializeArray (arr, indent, baseIndent) {
229
+ var output = '[';
230
+ var separator = indent ? '\n' + baseIndent + indent : '';
231
+ for (var i = 0; i < arr.length; i++) {
232
+ var key = arr[i];
233
+ output += "" + (i > 0 ? ',' : '') + separator + (serialize(key, indent, baseIndent + indent));
234
+ }
235
+ return output + (indent ? '\n' + baseIndent : '') + "]";
236
+ }
237
+
238
+ function serializeObject (obj, indent, baseIndent) {
239
+ var output = '{';
240
+ var separator = indent ? '\n' + baseIndent + indent : '';
241
+ var keys = Object.keys(obj);
242
+ for (var i = 0; i < keys.length; i++) {
243
+ var key = keys[i];
244
+ var stringKey = makeLegalIdentifier(key) === key ? key : JSON.stringify(key);
245
+ output += "" + (i > 0 ? ',' : '') + separator + stringKey + ":" + (indent ? ' ' : '') + (serialize(obj[key], indent, baseIndent + indent));
246
+ }
247
+ return output + (indent ? '\n' + baseIndent : '') + "}";
248
+ }
249
+
250
+ function serialize (obj, indent, baseIndent) {
251
+ if (obj === Infinity)
252
+ { return 'Infinity'; }
253
+ if (obj instanceof Date)
254
+ { return 'new Date(' + obj.getTime() + ')'; }
255
+ if (obj instanceof RegExp)
256
+ { return obj.toString(); }
257
+ if (typeof obj === 'number' && isNaN(obj))
258
+ { return 'NaN'; }
259
+ if (Array.isArray(obj))
260
+ { return serializeArray(obj, indent, baseIndent); }
261
+ if (obj === null)
262
+ { return 'null'; }
263
+ if (typeof obj === 'object')
264
+ { return serializeObject(obj, indent, baseIndent); }
265
+ return JSON.stringify(obj);
266
+ }
267
+
268
+ // convert data object into separate named exports (and default)
269
+ function dataToNamedExports (data, options) {
270
+ if ( options === void 0 ) options = {};
271
+
272
+ var t = options.compact ? '' : 'indent' in options ? options.indent : '\t';
273
+ var _ = options.compact ? '' : ' ';
274
+ var n = options.compact ? '' : '\n';
275
+ var declarationType = options.preferConst ? 'const' : 'var';
276
+
277
+ if (options.namedExports === false || typeof data !== 'object' || Array.isArray(data) || data === null)
278
+ { return ("export default" + _ + (serialize( data, options.compact ? null : t, '' )) + ";"); }
279
+
280
+ var namedExportCode = '';
281
+ var defaultExportRows = [];
282
+ var dataKeys = Object.keys(data);
283
+ for (var i = 0; i < dataKeys.length; i++) {
284
+ var key = dataKeys[i];
285
+ if (key === makeLegalIdentifier(key)) {
286
+ if (options.objectShorthand)
287
+ { defaultExportRows.push(key); }
288
+ else
289
+ { defaultExportRows.push((key + ":" + _ + key)); }
290
+ namedExportCode += "export " + declarationType + " " + key + _ + "=" + _ + (serialize(data[key], options.compact ? null : t, '')) + ";" + n;
291
+ } else {
292
+ defaultExportRows.push(((JSON.stringify(key)) + ": " + (serialize(data[key], options.compact ? null : t, ''))));
293
+ }
294
+ }
295
+ return namedExportCode + "export default" + _ + "{" + n + t + (defaultExportRows.join(("," + n + t))) + n + "};" + n;
296
+ }
297
+
298
+ exports.addExtension = addExtension;
299
+ exports.attachScopes = attachScopes;
300
+ exports.createFilter = createFilter;
301
+ exports.makeLegalIdentifier = makeLegalIdentifier;
302
+ exports.dataToEsm = dataToNamedExports;