use directories for structure
This commit is contained in:
28
node_modules/acorn-dynamic-import/CHANGELOG.md
generated
vendored
Normal file
28
node_modules/acorn-dynamic-import/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
# 4.0.0
|
||||
|
||||
- Updating to Acorn 6.
|
||||
|
||||
# 3.0.0
|
||||
|
||||
- Adding acorn walk support.
|
||||
- Bump acorn version.
|
||||
|
||||
# 2.0.2
|
||||
|
||||
- Fixing parsing of `yield import()`.
|
||||
|
||||
# 2.0.1
|
||||
|
||||
- Removing unnecessary `in-publish` dependency.
|
||||
|
||||
# 2.0.0
|
||||
|
||||
- Updating acorn version to >= 4.
|
||||
|
||||
# 1.0.1
|
||||
|
||||
- Fixes for publishing the module.
|
||||
|
||||
# 1.0.0
|
||||
|
||||
- Initial release of plugin.
|
21
node_modules/acorn-dynamic-import/LICENSE
generated
vendored
Normal file
21
node_modules/acorn-dynamic-import/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2016 Jordan Gensler
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
29
node_modules/acorn-dynamic-import/README.md
generated
vendored
Normal file
29
node_modules/acorn-dynamic-import/README.md
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
# Dynamic import support in acorn
|
||||
|
||||
This is plugin for [Acorn](http://marijnhaverbeke.nl/acorn/) - a tiny, fast JavaScript parser, written completely in JavaScript.
|
||||
|
||||
For more information, check out the [proposal repo](https://github.com/tc39/proposal-dynamic-import).
|
||||
|
||||
## Usage
|
||||
|
||||
Importing this module gives you a plugin that can be used to extend an Acorn parser:
|
||||
|
||||
```js
|
||||
import Parser from 'acorn';
|
||||
import dynamicImport from 'acorn-dynamic-import';
|
||||
|
||||
Parser.extend(dynamicImport).parse('import("something");');
|
||||
```
|
||||
|
||||
To extend the AST walker for dynamic imports, you can injecting the new node type into [`acorn-walk`](https://www.npmjs.com/package/acorn-walk) like this:
|
||||
|
||||
```js
|
||||
import inject from 'acorn-dynamic-import/lib/walk';
|
||||
import * as acornWalk from 'acorn-walk';
|
||||
|
||||
const walk = inject(acornWalk);
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
This plugin is issued under the [MIT license](./LICENSE).
|
84
node_modules/acorn-dynamic-import/lib/index.js
generated
vendored
Normal file
84
node_modules/acorn-dynamic-import/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.DynamicImportKey = undefined;
|
||||
|
||||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||||
|
||||
var _get = function () {
|
||||
function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }
|
||||
|
||||
return get;
|
||||
}();
|
||||
|
||||
exports['default'] = dynamicImport;
|
||||
|
||||
var _acorn = require('acorn');
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* eslint-disable no-underscore-dangle */
|
||||
|
||||
|
||||
var DynamicImportKey = exports.DynamicImportKey = 'Import';
|
||||
|
||||
// NOTE: This allows `yield import()` to parse correctly.
|
||||
_acorn.tokTypes._import.startsExpr = true;
|
||||
|
||||
function parseDynamicImport() {
|
||||
var node = this.startNode();
|
||||
this.next();
|
||||
if (this.type !== _acorn.tokTypes.parenL) {
|
||||
this.unexpected();
|
||||
}
|
||||
return this.finishNode(node, DynamicImportKey);
|
||||
}
|
||||
|
||||
function parenAfter() {
|
||||
return (/^(\s|\/\/.*|\/\*[^]*?\*\/)*\(/.test(this.input.slice(this.pos))
|
||||
);
|
||||
}
|
||||
|
||||
function dynamicImport(Parser) {
|
||||
return function (_Parser) {
|
||||
_inherits(_class, _Parser);
|
||||
|
||||
function _class() {
|
||||
_classCallCheck(this, _class);
|
||||
|
||||
return _possibleConstructorReturn(this, (_class.__proto__ || Object.getPrototypeOf(_class)).apply(this, arguments));
|
||||
}
|
||||
|
||||
_createClass(_class, [{
|
||||
key: 'parseStatement',
|
||||
value: function () {
|
||||
function parseStatement(context, topLevel, exports) {
|
||||
if (this.type === _acorn.tokTypes._import && parenAfter.call(this)) {
|
||||
return this.parseExpressionStatement(this.startNode(), this.parseExpression());
|
||||
}
|
||||
return _get(_class.prototype.__proto__ || Object.getPrototypeOf(_class.prototype), 'parseStatement', this).call(this, context, topLevel, exports);
|
||||
}
|
||||
|
||||
return parseStatement;
|
||||
}()
|
||||
}, {
|
||||
key: 'parseExprAtom',
|
||||
value: function () {
|
||||
function parseExprAtom(refDestructuringErrors) {
|
||||
if (this.type === _acorn.tokTypes._import) {
|
||||
return parseDynamicImport.call(this);
|
||||
}
|
||||
return _get(_class.prototype.__proto__ || Object.getPrototypeOf(_class.prototype), 'parseExprAtom', this).call(this, refDestructuringErrors);
|
||||
}
|
||||
|
||||
return parseExprAtom;
|
||||
}()
|
||||
}]);
|
||||
|
||||
return _class;
|
||||
}(Parser);
|
||||
}
|
16
node_modules/acorn-dynamic-import/lib/walk.js
generated
vendored
Normal file
16
node_modules/acorn-dynamic-import/lib/walk.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports['default'] = inject;
|
||||
|
||||
var _index = require('./index');
|
||||
|
||||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
function inject(injectableWalk) {
|
||||
return Object.assign({}, injectableWalk, {
|
||||
base: Object.assign({}, injectableWalk.base, _defineProperty({}, _index.DynamicImportKey, function () {}))
|
||||
});
|
||||
}
|
83
node_modules/acorn-dynamic-import/package.json
generated
vendored
Normal file
83
node_modules/acorn-dynamic-import/package.json
generated
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"acorn-dynamic-import@4.0.0",
|
||||
"D:\\Projects\\siag\\vanillajs-seed"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "acorn-dynamic-import@4.0.0",
|
||||
"_id": "acorn-dynamic-import@4.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==",
|
||||
"_location": "/acorn-dynamic-import",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "acorn-dynamic-import@4.0.0",
|
||||
"name": "acorn-dynamic-import",
|
||||
"escapedName": "acorn-dynamic-import",
|
||||
"rawSpec": "4.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "4.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/acorn-stage3",
|
||||
"/i18next-scanner"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz",
|
||||
"_spec": "4.0.0",
|
||||
"_where": "D:\\Projects\\siag\\vanillajs-seed",
|
||||
"author": {
|
||||
"name": "Jordan Gensler",
|
||||
"email": "jordangens@gmail.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/kesne/acorn-dynamic-import/issues"
|
||||
},
|
||||
"description": "Support dynamic imports in acorn",
|
||||
"devDependencies": {
|
||||
"acorn": "^6.0.0",
|
||||
"acorn-walk": "^6.0.0",
|
||||
"babel-cli": "^6.18.0",
|
||||
"babel-eslint": "^7.1.1",
|
||||
"babel-preset-airbnb": "^2.1.1",
|
||||
"babel-register": "^6.18.0",
|
||||
"chai": "^3.0.0",
|
||||
"eslint": "^3.10.2",
|
||||
"eslint-config-airbnb-base": "^10.0.1",
|
||||
"eslint-plugin-import": "^2.2.0",
|
||||
"in-publish": "^2.0.0",
|
||||
"mocha": "^5.2.0",
|
||||
"rimraf": "^2.5.4",
|
||||
"safe-publish-latest": "^1.1.1"
|
||||
},
|
||||
"homepage": "https://github.com/kesne/acorn-dynamic-import",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"name": "acorn-dynamic-import",
|
||||
"peerDependencies": {
|
||||
"acorn": "^6.0.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/kesne/acorn-dynamic-import.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "babel src --out-dir lib",
|
||||
"check-changelog": "expr $(git status --porcelain 2>/dev/null| grep \"^\\s*M.*CHANGELOG.md\" | wc -l) >/dev/null || (echo 'Please edit CHANGELOG.md' && exit 1)",
|
||||
"check-only-changelog-changed": "(expr $(git status --porcelain 2>/dev/null| grep -v \"CHANGELOG.md\" | wc -l) >/dev/null && echo 'Only CHANGELOG.md may have uncommitted changes' && exit 1) || exit 0",
|
||||
"lint": "eslint .",
|
||||
"postversion": "git commit package.json CHANGELOG.md -m \"v$npm_package_version\" && npm run tag && git push && git push --tags",
|
||||
"prepublish": "in-publish && safe-publish-latest && npm run build || not-in-publish",
|
||||
"preversion": "npm run test && npm run check-changelog && npm run check-only-changelog-changed",
|
||||
"tag": "git tag v$npm_package_version",
|
||||
"test": "npm run lint && npm run tests-only",
|
||||
"tests-only": "mocha",
|
||||
"version:major": "npm --no-git-tag-version version major",
|
||||
"version:minor": "npm --no-git-tag-version version minor",
|
||||
"version:patch": "npm --no-git-tag-version version patch"
|
||||
},
|
||||
"version": "4.0.0"
|
||||
}
|
38
node_modules/acorn-dynamic-import/src/index.js
generated
vendored
Normal file
38
node_modules/acorn-dynamic-import/src/index.js
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
/* eslint-disable no-underscore-dangle */
|
||||
import { tokTypes as tt } from 'acorn';
|
||||
|
||||
export const DynamicImportKey = 'Import';
|
||||
|
||||
// NOTE: This allows `yield import()` to parse correctly.
|
||||
tt._import.startsExpr = true;
|
||||
|
||||
function parseDynamicImport() {
|
||||
const node = this.startNode();
|
||||
this.next();
|
||||
if (this.type !== tt.parenL) {
|
||||
this.unexpected();
|
||||
}
|
||||
return this.finishNode(node, DynamicImportKey);
|
||||
}
|
||||
|
||||
function parenAfter() {
|
||||
return /^(\s|\/\/.*|\/\*[^]*?\*\/)*\(/.test(this.input.slice(this.pos));
|
||||
}
|
||||
|
||||
export default function dynamicImport(Parser) {
|
||||
return class extends Parser {
|
||||
parseStatement(context, topLevel, exports) {
|
||||
if (this.type === tt._import && parenAfter.call(this)) {
|
||||
return this.parseExpressionStatement(this.startNode(), this.parseExpression());
|
||||
}
|
||||
return super.parseStatement(context, topLevel, exports);
|
||||
}
|
||||
|
||||
parseExprAtom(refDestructuringErrors) {
|
||||
if (this.type === tt._import) {
|
||||
return parseDynamicImport.call(this);
|
||||
}
|
||||
return super.parseExprAtom(refDestructuringErrors);
|
||||
}
|
||||
};
|
||||
}
|
9
node_modules/acorn-dynamic-import/src/walk.js
generated
vendored
Normal file
9
node_modules/acorn-dynamic-import/src/walk.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import { DynamicImportKey } from './index';
|
||||
|
||||
export default function inject(injectableWalk) {
|
||||
return Object.assign({}, injectableWalk, {
|
||||
base: Object.assign({}, injectableWalk.base, {
|
||||
[DynamicImportKey]() {},
|
||||
}),
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user