$
This commit is contained in:
3
node_modules/esrecurse/.babelrc
generated
vendored
Normal file
3
node_modules/esrecurse/.babelrc
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"presets": ["es2015"]
|
||||
}
|
171
node_modules/esrecurse/README.md
generated
vendored
Normal file
171
node_modules/esrecurse/README.md
generated
vendored
Normal file
@@ -0,0 +1,171 @@
|
||||
### Esrecurse [](https://travis-ci.org/estools/esrecurse)
|
||||
|
||||
Esrecurse ([esrecurse](https://github.com/estools/esrecurse)) is
|
||||
[ECMAScript](https://www.ecma-international.org/publications/standards/Ecma-262.htm)
|
||||
recursive traversing functionality.
|
||||
|
||||
### Example Usage
|
||||
|
||||
The following code will output all variables declared at the root of a file.
|
||||
|
||||
```javascript
|
||||
esrecurse.visit(ast, {
|
||||
XXXStatement: function (node) {
|
||||
this.visit(node.left);
|
||||
// do something...
|
||||
this.visit(node.right);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
We can use `Visitor` instance.
|
||||
|
||||
```javascript
|
||||
var visitor = new esrecurse.Visitor({
|
||||
XXXStatement: function (node) {
|
||||
this.visit(node.left);
|
||||
// do something...
|
||||
this.visit(node.right);
|
||||
}
|
||||
});
|
||||
|
||||
visitor.visit(ast);
|
||||
```
|
||||
|
||||
We can inherit `Visitor` instance easily.
|
||||
|
||||
```javascript
|
||||
class Derived extends esrecurse.Visitor {
|
||||
constructor()
|
||||
{
|
||||
super(null);
|
||||
}
|
||||
|
||||
XXXStatement(node) {
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```javascript
|
||||
function DerivedVisitor() {
|
||||
esrecurse.Visitor.call(/* this for constructor */ this /* visitor object automatically becomes this. */);
|
||||
}
|
||||
util.inherits(DerivedVisitor, esrecurse.Visitor);
|
||||
DerivedVisitor.prototype.XXXStatement = function (node) {
|
||||
this.visit(node.left);
|
||||
// do something...
|
||||
this.visit(node.right);
|
||||
};
|
||||
```
|
||||
|
||||
And you can invoke default visiting operation inside custom visit operation.
|
||||
|
||||
```javascript
|
||||
function DerivedVisitor() {
|
||||
esrecurse.Visitor.call(/* this for constructor */ this /* visitor object automatically becomes this. */);
|
||||
}
|
||||
util.inherits(DerivedVisitor, esrecurse.Visitor);
|
||||
DerivedVisitor.prototype.XXXStatement = function (node) {
|
||||
// do something...
|
||||
this.visitChildren(node);
|
||||
};
|
||||
```
|
||||
|
||||
The `childVisitorKeys` option does customize the behaviour of `this.visitChildren(node)`.
|
||||
We can use user-defined node types.
|
||||
|
||||
```javascript
|
||||
// This tree contains a user-defined `TestExpression` node.
|
||||
var tree = {
|
||||
type: 'TestExpression',
|
||||
|
||||
// This 'argument' is the property containing the other **node**.
|
||||
argument: {
|
||||
type: 'Literal',
|
||||
value: 20
|
||||
},
|
||||
|
||||
// This 'extended' is the property not containing the other **node**.
|
||||
extended: true
|
||||
};
|
||||
esrecurse.visit(
|
||||
ast,
|
||||
{
|
||||
Literal: function (node) {
|
||||
// do something...
|
||||
}
|
||||
},
|
||||
{
|
||||
// Extending the existing traversing rules.
|
||||
childVisitorKeys: {
|
||||
// TargetNodeName: [ 'keys', 'containing', 'the', 'other', '**node**' ]
|
||||
TestExpression: ['argument']
|
||||
}
|
||||
}
|
||||
);
|
||||
```
|
||||
|
||||
We can use the `fallback` option as well.
|
||||
If the `fallback` option is `"iteration"`, `esrecurse` would visit all enumerable properties of unknown nodes.
|
||||
Please note circular references cause the stack overflow. AST might have circular references in additional properties for some purpose (e.g. `node.parent`).
|
||||
|
||||
```javascript
|
||||
esrecurse.visit(
|
||||
ast,
|
||||
{
|
||||
Literal: function (node) {
|
||||
// do something...
|
||||
}
|
||||
},
|
||||
{
|
||||
fallback: 'iteration'
|
||||
}
|
||||
);
|
||||
```
|
||||
|
||||
If the `fallback` option is a function, `esrecurse` calls this function to determine the enumerable properties of unknown nodes.
|
||||
Please note circular references cause the stack overflow. AST might have circular references in additional properties for some purpose (e.g. `node.parent`).
|
||||
|
||||
```javascript
|
||||
esrecurse.visit(
|
||||
ast,
|
||||
{
|
||||
Literal: function (node) {
|
||||
// do something...
|
||||
}
|
||||
},
|
||||
{
|
||||
fallback: function (node) {
|
||||
return Object.keys(node).filter(function(key) {
|
||||
return key !== 'argument'
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
```
|
||||
|
||||
### License
|
||||
|
||||
Copyright (C) 2014 [Yusuke Suzuki](https://github.com/Constellation)
|
||||
(twitter: [@Constellation](https://twitter.com/Constellation)) and other contributors.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
117
node_modules/esrecurse/esrecurse.js
generated
vendored
Normal file
117
node_modules/esrecurse/esrecurse.js
generated
vendored
Normal file
@@ -0,0 +1,117 @@
|
||||
/*
|
||||
Copyright (C) 2014 Yusuke Suzuki <utatane.tea@gmail.com>
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
var estraverse = require('estraverse');
|
||||
|
||||
function isNode(node) {
|
||||
if (node == null) {
|
||||
return false;
|
||||
}
|
||||
return typeof node === 'object' && typeof node.type === 'string';
|
||||
}
|
||||
|
||||
function isProperty(nodeType, key) {
|
||||
return (nodeType === estraverse.Syntax.ObjectExpression || nodeType === estraverse.Syntax.ObjectPattern) && key === 'properties';
|
||||
}
|
||||
|
||||
function Visitor(visitor, options) {
|
||||
options = options || {};
|
||||
|
||||
this.__visitor = visitor || this;
|
||||
this.__childVisitorKeys = options.childVisitorKeys
|
||||
? Object.assign({}, estraverse.VisitorKeys, options.childVisitorKeys)
|
||||
: estraverse.VisitorKeys;
|
||||
if (options.fallback === 'iteration') {
|
||||
this.__fallback = Object.keys;
|
||||
} else if (typeof options.fallback === 'function') {
|
||||
this.__fallback = options.fallback;
|
||||
}
|
||||
}
|
||||
|
||||
/* Default method for visiting children.
|
||||
* When you need to call default visiting operation inside custom visiting
|
||||
* operation, you can use it with `this.visitChildren(node)`.
|
||||
*/
|
||||
Visitor.prototype.visitChildren = function (node) {
|
||||
var type, children, i, iz, j, jz, child;
|
||||
|
||||
if (node == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
type = node.type || estraverse.Syntax.Property;
|
||||
|
||||
children = this.__childVisitorKeys[type];
|
||||
if (!children) {
|
||||
if (this.__fallback) {
|
||||
children = this.__fallback(node);
|
||||
} else {
|
||||
throw new Error('Unknown node type ' + type + '.');
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0, iz = children.length; i < iz; ++i) {
|
||||
child = node[children[i]];
|
||||
if (child) {
|
||||
if (Array.isArray(child)) {
|
||||
for (j = 0, jz = child.length; j < jz; ++j) {
|
||||
if (child[j]) {
|
||||
if (isNode(child[j]) || isProperty(type, children[i])) {
|
||||
this.visit(child[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (isNode(child)) {
|
||||
this.visit(child);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/* Dispatching node. */
|
||||
Visitor.prototype.visit = function (node) {
|
||||
var type;
|
||||
|
||||
if (node == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
type = node.type || estraverse.Syntax.Property;
|
||||
if (this.__visitor[type]) {
|
||||
this.__visitor[type].call(this, node);
|
||||
return;
|
||||
}
|
||||
this.visitChildren(node);
|
||||
};
|
||||
|
||||
exports.version = require('./package.json').version;
|
||||
exports.Visitor = Visitor;
|
||||
exports.visit = function (node, visitor, options) {
|
||||
var v = new Visitor(visitor, options);
|
||||
v.visit(node);
|
||||
};
|
||||
}());
|
||||
/* vim: set sw=4 ts=4 et tw=80 : */
|
92
node_modules/esrecurse/gulpfile.babel.js
generated
vendored
Normal file
92
node_modules/esrecurse/gulpfile.babel.js
generated
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
// Copyright (C) 2014 Yusuke Suzuki <utatane.tea@gmail.com>
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
||||
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import gulp from 'gulp';
|
||||
import mocha from 'gulp-mocha';
|
||||
import eslint from 'gulp-eslint';
|
||||
import minimist from 'minimist';
|
||||
import git from 'gulp-git';
|
||||
import bump from 'gulp-bump';
|
||||
import filter from 'gulp-filter';
|
||||
import tagVersion from 'gulp-tag-version';
|
||||
import 'babel-register';
|
||||
|
||||
const SOURCE = [
|
||||
'*.js'
|
||||
];
|
||||
|
||||
let ESLINT_OPTION = {
|
||||
parser: 'babel-eslint',
|
||||
parserOptions: {
|
||||
'sourceType': 'module'
|
||||
},
|
||||
rules: {
|
||||
'quotes': 0,
|
||||
'eqeqeq': 0,
|
||||
'no-use-before-define': 0,
|
||||
'no-shadow': 0,
|
||||
'no-new': 0,
|
||||
'no-underscore-dangle': 0,
|
||||
'no-multi-spaces': 0,
|
||||
'no-native-reassign': 0,
|
||||
'no-loop-func': 0
|
||||
},
|
||||
env: {
|
||||
'node': true
|
||||
}
|
||||
};
|
||||
|
||||
gulp.task('test', function() {
|
||||
let options = minimist(process.argv.slice(2), {
|
||||
string: 'test',
|
||||
default: {
|
||||
test: 'test/*.js'
|
||||
}
|
||||
}
|
||||
);
|
||||
return gulp.src(options.test).pipe(mocha({reporter: 'spec'}));
|
||||
});
|
||||
|
||||
gulp.task('lint', () =>
|
||||
gulp.src(SOURCE)
|
||||
.pipe(eslint(ESLINT_OPTION))
|
||||
.pipe(eslint.formatEach('stylish', process.stderr))
|
||||
.pipe(eslint.failOnError())
|
||||
);
|
||||
|
||||
let inc = importance =>
|
||||
gulp.src(['./package.json'])
|
||||
.pipe(bump({type: importance}))
|
||||
.pipe(gulp.dest('./'))
|
||||
.pipe(git.commit('Bumps package version'))
|
||||
.pipe(filter('package.json'))
|
||||
.pipe(tagVersion({
|
||||
prefix: ''
|
||||
}))
|
||||
;
|
||||
|
||||
gulp.task('travis', [ 'lint', 'test' ]);
|
||||
gulp.task('default', [ 'travis' ]);
|
||||
|
||||
gulp.task('patch', [ ], () => inc('patch'));
|
||||
gulp.task('minor', [ ], () => inc('minor'));
|
||||
gulp.task('major', [ ], () => inc('major'));
|
16
node_modules/esrecurse/node_modules/estraverse/.jshintrc
generated
vendored
Normal file
16
node_modules/esrecurse/node_modules/estraverse/.jshintrc
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"curly": true,
|
||||
"eqeqeq": true,
|
||||
"immed": true,
|
||||
"eqnull": true,
|
||||
"latedef": true,
|
||||
"noarg": true,
|
||||
"noempty": true,
|
||||
"quotmark": "single",
|
||||
"undef": true,
|
||||
"unused": true,
|
||||
"strict": true,
|
||||
"trailing": true,
|
||||
|
||||
"node": true
|
||||
}
|
19
node_modules/esrecurse/node_modules/estraverse/LICENSE.BSD
generated
vendored
Normal file
19
node_modules/esrecurse/node_modules/estraverse/LICENSE.BSD
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
153
node_modules/esrecurse/node_modules/estraverse/README.md
generated
vendored
Normal file
153
node_modules/esrecurse/node_modules/estraverse/README.md
generated
vendored
Normal file
@@ -0,0 +1,153 @@
|
||||
### Estraverse [](http://travis-ci.org/estools/estraverse)
|
||||
|
||||
Estraverse ([estraverse](http://github.com/estools/estraverse)) is
|
||||
[ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm)
|
||||
traversal functions from [esmangle project](http://github.com/estools/esmangle).
|
||||
|
||||
### Documentation
|
||||
|
||||
You can find usage docs at [wiki page](https://github.com/estools/estraverse/wiki/Usage).
|
||||
|
||||
### Example Usage
|
||||
|
||||
The following code will output all variables declared at the root of a file.
|
||||
|
||||
```javascript
|
||||
estraverse.traverse(ast, {
|
||||
enter: function (node, parent) {
|
||||
if (node.type == 'FunctionExpression' || node.type == 'FunctionDeclaration')
|
||||
return estraverse.VisitorOption.Skip;
|
||||
},
|
||||
leave: function (node, parent) {
|
||||
if (node.type == 'VariableDeclarator')
|
||||
console.log(node.id.name);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
We can use `this.skip`, `this.remove` and `this.break` functions instead of using Skip, Remove and Break.
|
||||
|
||||
```javascript
|
||||
estraverse.traverse(ast, {
|
||||
enter: function (node) {
|
||||
this.break();
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
And estraverse provides `estraverse.replace` function. When returning node from `enter`/`leave`, current node is replaced with it.
|
||||
|
||||
```javascript
|
||||
result = estraverse.replace(tree, {
|
||||
enter: function (node) {
|
||||
// Replace it with replaced.
|
||||
if (node.type === 'Literal')
|
||||
return replaced;
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
By passing `visitor.keys` mapping, we can extend estraverse traversing functionality.
|
||||
|
||||
```javascript
|
||||
// This tree contains a user-defined `TestExpression` node.
|
||||
var tree = {
|
||||
type: 'TestExpression',
|
||||
|
||||
// This 'argument' is the property containing the other **node**.
|
||||
argument: {
|
||||
type: 'Literal',
|
||||
value: 20
|
||||
},
|
||||
|
||||
// This 'extended' is the property not containing the other **node**.
|
||||
extended: true
|
||||
};
|
||||
estraverse.traverse(tree, {
|
||||
enter: function (node) { },
|
||||
|
||||
// Extending the existing traversing rules.
|
||||
keys: {
|
||||
// TargetNodeName: [ 'keys', 'containing', 'the', 'other', '**node**' ]
|
||||
TestExpression: ['argument']
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
By passing `visitor.fallback` option, we can control the behavior when encountering unknown nodes.
|
||||
|
||||
```javascript
|
||||
// This tree contains a user-defined `TestExpression` node.
|
||||
var tree = {
|
||||
type: 'TestExpression',
|
||||
|
||||
// This 'argument' is the property containing the other **node**.
|
||||
argument: {
|
||||
type: 'Literal',
|
||||
value: 20
|
||||
},
|
||||
|
||||
// This 'extended' is the property not containing the other **node**.
|
||||
extended: true
|
||||
};
|
||||
estraverse.traverse(tree, {
|
||||
enter: function (node) { },
|
||||
|
||||
// Iterating the child **nodes** of unknown nodes.
|
||||
fallback: 'iteration'
|
||||
});
|
||||
```
|
||||
|
||||
When `visitor.fallback` is a function, we can determine which keys to visit on each node.
|
||||
|
||||
```javascript
|
||||
// This tree contains a user-defined `TestExpression` node.
|
||||
var tree = {
|
||||
type: 'TestExpression',
|
||||
|
||||
// This 'argument' is the property containing the other **node**.
|
||||
argument: {
|
||||
type: 'Literal',
|
||||
value: 20
|
||||
},
|
||||
|
||||
// This 'extended' is the property not containing the other **node**.
|
||||
extended: true
|
||||
};
|
||||
estraverse.traverse(tree, {
|
||||
enter: function (node) { },
|
||||
|
||||
// Skip the `argument` property of each node
|
||||
fallback: function(node) {
|
||||
return Object.keys(node).filter(function(key) {
|
||||
return key !== 'argument';
|
||||
});
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### License
|
||||
|
||||
Copyright (C) 2012-2016 [Yusuke Suzuki](http://github.com/Constellation)
|
||||
(twitter: [@Constellation](http://twitter.com/Constellation)) and other contributors.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
801
node_modules/esrecurse/node_modules/estraverse/estraverse.js
generated
vendored
Normal file
801
node_modules/esrecurse/node_modules/estraverse/estraverse.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
70
node_modules/esrecurse/node_modules/estraverse/gulpfile.js
generated
vendored
Normal file
70
node_modules/esrecurse/node_modules/estraverse/gulpfile.js
generated
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
Copyright (C) 2014 Yusuke Suzuki <utatane.tea@gmail.com>
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var gulp = require('gulp'),
|
||||
git = require('gulp-git'),
|
||||
bump = require('gulp-bump'),
|
||||
filter = require('gulp-filter'),
|
||||
tagVersion = require('gulp-tag-version');
|
||||
|
||||
var TEST = [ 'test/*.js' ];
|
||||
var POWERED = [ 'powered-test/*.js' ];
|
||||
var SOURCE = [ 'src/**/*.js' ];
|
||||
|
||||
/**
|
||||
* Bumping version number and tagging the repository with it.
|
||||
* Please read http://semver.org/
|
||||
*
|
||||
* You can use the commands
|
||||
*
|
||||
* gulp patch # makes v0.1.0 -> v0.1.1
|
||||
* gulp feature # makes v0.1.1 -> v0.2.0
|
||||
* gulp release # makes v0.2.1 -> v1.0.0
|
||||
*
|
||||
* To bump the version numbers accordingly after you did a patch,
|
||||
* introduced a feature or made a backwards-incompatible release.
|
||||
*/
|
||||
|
||||
function inc(importance) {
|
||||
// get all the files to bump version in
|
||||
return gulp.src(['./package.json'])
|
||||
// bump the version number in those files
|
||||
.pipe(bump({type: importance}))
|
||||
// save it back to filesystem
|
||||
.pipe(gulp.dest('./'))
|
||||
// commit the changed version number
|
||||
.pipe(git.commit('Bumps package version'))
|
||||
// read only one file to get the version number
|
||||
.pipe(filter('package.json'))
|
||||
// **tag it in the repository**
|
||||
.pipe(tagVersion({
|
||||
prefix: ''
|
||||
}));
|
||||
}
|
||||
|
||||
gulp.task('patch', [ ], function () { return inc('patch'); })
|
||||
gulp.task('minor', [ ], function () { return inc('minor'); })
|
||||
gulp.task('major', [ ], function () { return inc('major'); })
|
40
node_modules/esrecurse/node_modules/estraverse/package.json
generated
vendored
Normal file
40
node_modules/esrecurse/node_modules/estraverse/package.json
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"name": "estraverse",
|
||||
"description": "ECMAScript JS AST traversal functions",
|
||||
"homepage": "https://github.com/estools/estraverse",
|
||||
"main": "estraverse.js",
|
||||
"version": "5.2.0",
|
||||
"engines": {
|
||||
"node": ">=4.0"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Yusuke Suzuki",
|
||||
"email": "utatane.tea@gmail.com",
|
||||
"web": "http://github.com/Constellation"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "http://github.com/estools/estraverse.git"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-preset-env": "^1.6.1",
|
||||
"babel-register": "^6.3.13",
|
||||
"chai": "^2.1.1",
|
||||
"espree": "^1.11.0",
|
||||
"gulp": "^3.8.10",
|
||||
"gulp-bump": "^0.2.2",
|
||||
"gulp-filter": "^2.0.0",
|
||||
"gulp-git": "^1.0.1",
|
||||
"gulp-tag-version": "^1.3.0",
|
||||
"jshint": "^2.5.6",
|
||||
"mocha": "^2.1.0"
|
||||
},
|
||||
"license": "BSD-2-Clause",
|
||||
"scripts": {
|
||||
"test": "npm run-script lint && npm run-script unit-test",
|
||||
"lint": "jshint estraverse.js",
|
||||
"unit-test": "mocha --compilers js:babel-register"
|
||||
}
|
||||
}
|
52
node_modules/esrecurse/package.json
generated
vendored
Normal file
52
node_modules/esrecurse/package.json
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"name": "esrecurse",
|
||||
"description": "ECMAScript AST recursive visitor",
|
||||
"homepage": "https://github.com/estools/esrecurse",
|
||||
"main": "esrecurse.js",
|
||||
"version": "4.3.0",
|
||||
"engines": {
|
||||
"node": ">=4.0"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Yusuke Suzuki",
|
||||
"email": "utatane.tea@gmail.com",
|
||||
"web": "https://github.com/Constellation"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/estools/esrecurse.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"estraverse": "^5.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-cli": "^6.24.1",
|
||||
"babel-eslint": "^7.2.3",
|
||||
"babel-preset-es2015": "^6.24.1",
|
||||
"babel-register": "^6.24.1",
|
||||
"chai": "^4.0.2",
|
||||
"esprima": "^4.0.0",
|
||||
"gulp": "^3.9.0",
|
||||
"gulp-bump": "^2.7.0",
|
||||
"gulp-eslint": "^4.0.0",
|
||||
"gulp-filter": "^5.0.0",
|
||||
"gulp-git": "^2.4.1",
|
||||
"gulp-mocha": "^4.3.1",
|
||||
"gulp-tag-version": "^1.2.1",
|
||||
"jsdoc": "^3.3.0-alpha10",
|
||||
"minimist": "^1.1.0"
|
||||
},
|
||||
"license": "BSD-2-Clause",
|
||||
"scripts": {
|
||||
"test": "gulp travis",
|
||||
"unit-test": "gulp test",
|
||||
"lint": "gulp lint"
|
||||
},
|
||||
"babel": {
|
||||
"presets": [
|
||||
"es2015"
|
||||
]
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user