first commit
This commit is contained in:
15
build/node_modules/inline-require/.istanbul.yml
generated
vendored
Normal file
15
build/node_modules/inline-require/.istanbul.yml
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
instrumentation:
|
||||
extensions:
|
||||
- .es
|
||||
embed-source: false
|
||||
baseline-file: ./coverage/coverage-baseline.json
|
||||
reporting:
|
||||
print: summary
|
||||
reports:
|
||||
- lcov
|
||||
dir: ./coverage
|
||||
watermarks:
|
||||
statements: [50, 80]
|
||||
lines: [50, 80]
|
||||
functions: [50, 80]
|
||||
branches: [50, 80]
|
||||
3
build/node_modules/inline-require/.npmignore
generated
vendored
Normal file
3
build/node_modules/inline-require/.npmignore
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
index.es
|
||||
.yarnclean
|
||||
yarn.lock
|
||||
11
build/node_modules/inline-require/.travis.yml
generated
vendored
Normal file
11
build/node_modules/inline-require/.travis.yml
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- '6'
|
||||
- '7'
|
||||
- '8'
|
||||
sudo: false
|
||||
script:
|
||||
- yarn test
|
||||
notifications:
|
||||
email: false
|
||||
after_success: 'yarn coveralls'
|
||||
5
build/node_modules/inline-require/LICENSE
generated
vendored
Normal file
5
build/node_modules/inline-require/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
Copyright 2017 Maxwell Simmer
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
43
build/node_modules/inline-require/README.md
generated
vendored
Normal file
43
build/node_modules/inline-require/README.md
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
# inline-require
|
||||
|
||||
> Replace require'd files with the files' contents
|
||||
|
||||
[](https://badge.fury.io/js/inline-require)
|
||||
[](https://travis-ci.org/msimmer/inline-require)
|
||||
[](https://coveralls.io/github/msimmer/inline-require?branch=master)
|
||||
|
||||
Inline dependencies from required modules. Can be used as a module using `require` or on the CLI.
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
$ yarn add inline-require
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
// my-dependency.js
|
||||
module.exports = { foo: 'bar' }
|
||||
```
|
||||
|
||||
```js
|
||||
// index.js
|
||||
const myDependency = require('./my-dependency')
|
||||
```
|
||||
|
||||
```js
|
||||
// build.js
|
||||
const inliner = require('inline-require')
|
||||
|
||||
inliner('./index.js', (err, data) => {
|
||||
if (err) { throw err }
|
||||
console.log(data) // => const myDependency = { foo: 'bar' }
|
||||
})
|
||||
```
|
||||
|
||||
## CLI
|
||||
|
||||
```sh
|
||||
$ node ./inliner ./index.js # prints to stdout
|
||||
```
|
||||
1
build/node_modules/inline-require/coverage/coverage.json
generated
vendored
Normal file
1
build/node_modules/inline-require/coverage/coverage.json
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"/Users/maxwellsimmer/git/inline-require/index.es":{"path":"/Users/maxwellsimmer/git/inline-require/index.es","s":{"1":1,"2":1,"3":1,"4":10,"5":10,"6":10,"7":10,"8":1,"9":7,"10":3,"11":4,"12":4,"13":4,"14":4,"15":1,"16":3,"17":3,"18":3,"19":10,"20":10,"21":10,"22":10,"23":10,"24":10,"25":3,"26":3,"27":3,"28":10,"29":3,"30":1,"31":0,"32":0,"33":0,"34":0,"35":0,"36":1},"b":{"1":[3,4],"2":[7,6],"3":[1,3],"4":[2,8],"5":[0,1],"6":[0,0],"7":[0,0],"8":[0,0]},"f":{"1":10,"2":7},"fnMap":{"1":{"name":"Token","line":4,"loc":{"start":{"line":4,"column":0},"end":{"line":4,"column":46}}},"2":{"name":"inliner","line":11,"loc":{"start":{"line":11,"column":0},"end":{"line":11,"column":34}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":24}},"2":{"start":{"line":2,"column":0},"end":{"line":2,"column":28}},"3":{"start":{"line":4,"column":0},"end":{"line":9,"column":1}},"4":{"start":{"line":5,"column":4},"end":{"line":5,"column":22}},"5":{"start":{"line":6,"column":4},"end":{"line":6,"column":18}},"6":{"start":{"line":7,"column":4},"end":{"line":7,"column":24}},"7":{"start":{"line":8,"column":4},"end":{"line":8,"column":22}},"8":{"start":{"line":11,"column":0},"end":{"line":51,"column":1}},"9":{"start":{"line":12,"column":4},"end":{"line":14,"column":5}},"10":{"start":{"line":13,"column":8},"end":{"line":13,"column":107}},"11":{"start":{"line":16,"column":4},"end":{"line":16,"column":61}},"12":{"start":{"line":17,"column":4},"end":{"line":17,"column":21}},"13":{"start":{"line":19,"column":4},"end":{"line":49,"column":6}},"14":{"start":{"line":20,"column":8},"end":{"line":20,"column":41}},"15":{"start":{"line":20,"column":19},"end":{"line":20,"column":40}},"16":{"start":{"line":22,"column":8},"end":{"line":22,"column":17}},"17":{"start":{"line":23,"column":8},"end":{"line":23,"column":22}},"18":{"start":{"line":24,"column":8},"end":{"line":40,"column":9}},"19":{"start":{"line":26,"column":12},"end":{"line":26,"column":60}},"20":{"start":{"line":27,"column":12},"end":{"line":27,"column":95}},"21":{"start":{"line":28,"column":12},"end":{"line":28,"column":43}},"22":{"start":{"line":29,"column":12},"end":{"line":29,"column":107}},"23":{"start":{"line":31,"column":12},"end":{"line":36,"column":15}},"24":{"start":{"line":38,"column":12},"end":{"line":38,"column":67}},"25":{"start":{"line":42,"column":8},"end":{"line":42,"column":17}},"26":{"start":{"line":43,"column":8},"end":{"line":43,"column":24}},"27":{"start":{"line":44,"column":8},"end":{"line":46,"column":9}},"28":{"start":{"line":45,"column":12},"end":{"line":45,"column":88}},"29":{"start":{"line":48,"column":8},"end":{"line":48,"column":35}},"30":{"start":{"line":54,"column":0},"end":{"line":61,"column":1},"skip":true},"31":{"start":{"line":55,"column":4},"end":{"line":60,"column":5},"skip":true},"32":{"start":{"line":56,"column":8},"end":{"line":59,"column":10},"skip":true},"33":{"start":{"line":57,"column":12},"end":{"line":57,"column":34},"skip":true},"34":{"start":{"line":57,"column":23},"end":{"line":57,"column":33},"skip":true},"35":{"start":{"line":58,"column":12},"end":{"line":58,"column":38},"skip":true},"36":{"start":{"line":64,"column":0},"end":{"line":64,"column":24}}},"branchMap":{"1":{"line":12,"type":"if","locations":[{"start":{"line":12,"column":4},"end":{"line":12,"column":4}},{"start":{"line":12,"column":4},"end":{"line":12,"column":4}}]},"2":{"line":12,"type":"binary-expr","locations":[{"start":{"line":12,"column":8},"end":{"line":12,"column":14}},{"start":{"line":12,"column":18},"end":{"line":12,"column":43}}]},"3":{"line":20,"type":"if","locations":[{"start":{"line":20,"column":8},"end":{"line":20,"column":8}},{"start":{"line":20,"column":8},"end":{"line":20,"column":8}}]},"4":{"line":29,"type":"cond-expr","locations":[{"start":{"line":29,"column":64},"end":{"line":29,"column":80}},{"start":{"line":29,"column":83},"end":{"line":29,"column":107}}]},"5":{"line":54,"type":"if","locations":[{"start":{"line":54,"column":0},"end":{"line":54,"column":0},"skip":true},{"start":{"line":54,"column":0},"end":{"line":54,"column":0},"skip":true}]},"6":{"line":55,"type":"if","locations":[{"start":{"line":55,"column":4},"end":{"line":55,"column":4},"skip":true},{"start":{"line":55,"column":4},"end":{"line":55,"column":4},"skip":true}]},"7":{"line":55,"type":"binary-expr","locations":[{"start":{"line":55,"column":8},"end":{"line":55,"column":20},"skip":true},{"start":{"line":55,"column":24},"end":{"line":55,"column":39},"skip":true}]},"8":{"line":57,"type":"if","locations":[{"start":{"line":57,"column":12},"end":{"line":57,"column":12},"skip":true},{"start":{"line":57,"column":12},"end":{"line":57,"column":12},"skip":true}]}}}}
|
||||
63
build/node_modules/inline-require/coverage/lcov.info
generated
vendored
Normal file
63
build/node_modules/inline-require/coverage/lcov.info
generated
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
TN:
|
||||
SF:/Users/maxwellsimmer/git/inline-require/index.es
|
||||
FN:4,Token
|
||||
FN:11,inliner
|
||||
FNF:2
|
||||
FNH:2
|
||||
FNDA:10,Token
|
||||
FNDA:7,inliner
|
||||
DA:1,1
|
||||
DA:2,1
|
||||
DA:4,1
|
||||
DA:5,10
|
||||
DA:6,10
|
||||
DA:7,10
|
||||
DA:8,10
|
||||
DA:11,1
|
||||
DA:12,7
|
||||
DA:13,3
|
||||
DA:16,4
|
||||
DA:17,4
|
||||
DA:19,4
|
||||
DA:20,4
|
||||
DA:22,3
|
||||
DA:23,3
|
||||
DA:24,3
|
||||
DA:26,10
|
||||
DA:27,10
|
||||
DA:28,10
|
||||
DA:29,10
|
||||
DA:31,10
|
||||
DA:38,10
|
||||
DA:42,3
|
||||
DA:43,3
|
||||
DA:44,3
|
||||
DA:45,10
|
||||
DA:48,3
|
||||
DA:54,1
|
||||
DA:55,1
|
||||
DA:56,1
|
||||
DA:57,1
|
||||
DA:58,1
|
||||
DA:64,1
|
||||
LF:34
|
||||
LH:34
|
||||
BRDA:12,1,0,3
|
||||
BRDA:12,1,1,4
|
||||
BRDA:12,2,0,7
|
||||
BRDA:12,2,1,6
|
||||
BRDA:20,3,0,1
|
||||
BRDA:20,3,1,3
|
||||
BRDA:29,4,0,2
|
||||
BRDA:29,4,1,8
|
||||
BRDA:54,5,0,0
|
||||
BRDA:54,5,1,1
|
||||
BRDA:55,6,0,0
|
||||
BRDA:55,6,1,0
|
||||
BRDA:55,7,0,0
|
||||
BRDA:55,7,1,0
|
||||
BRDA:57,8,0,0
|
||||
BRDA:57,8,1,0
|
||||
BRF:16
|
||||
BRH:16
|
||||
end_of_record
|
||||
81
build/node_modules/inline-require/index.js
generated
vendored
Executable file
81
build/node_modules/inline-require/index.js
generated
vendored
Executable file
@@ -0,0 +1,81 @@
|
||||
'use strict';
|
||||
|
||||
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
||||
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
||||
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
|
||||
function Token(_ref) {
|
||||
var begin = _ref.begin,
|
||||
end = _ref.end,
|
||||
offset = _ref.offset,
|
||||
value = _ref.value;
|
||||
|
||||
this.begin = begin;
|
||||
this.end = end;
|
||||
this.offset = offset;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
function inliner(fpath, callback) {
|
||||
if (!fpath || typeof fpath !== 'string') {
|
||||
return callback(new Error('[inline] expects first argument to be a string, ' + (typeof fpath === 'undefined' ? 'undefined' : _typeof(fpath)) + ' given'));
|
||||
}
|
||||
|
||||
var re = /\brequire\s*\(\s*['"]([./]+[^'"]+)['"]\s*\)/g;
|
||||
var tokens = [];
|
||||
|
||||
fs.readFile(path.resolve(fpath), 'utf8', function (err, _data) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
var match = void 0;
|
||||
var offset = 0;
|
||||
while ((match = re.exec(_data)) !== null) {
|
||||
var _match = match,
|
||||
_match2 = _slicedToArray(_match, 2),
|
||||
requireDeclaration = _match2[0],
|
||||
relativePath = _match2[1];
|
||||
|
||||
var dpath = path.resolve(path.resolve(path.dirname(fpath)), relativePath) + '.js';
|
||||
var required = require(dpath);
|
||||
var dependency = typeof required === 'function' ? String(required) : JSON.stringify(required);
|
||||
|
||||
tokens.push(new Token({
|
||||
begin: match.index + offset,
|
||||
end: re.lastIndex + offset,
|
||||
offset: offset,
|
||||
value: dependency
|
||||
}));
|
||||
|
||||
offset += dependency.length - requireDeclaration.length;
|
||||
}
|
||||
|
||||
var token = void 0;
|
||||
var data = _data;
|
||||
while (token = tokens.shift()) {
|
||||
data = '' + data.slice(0, token.begin) + token.value + data.slice(token.end);
|
||||
}
|
||||
|
||||
return callback(null, data);
|
||||
});
|
||||
}
|
||||
|
||||
/* istanbul ignore next */
|
||||
if (require.main === module) {
|
||||
// called from CLI
|
||||
if (process.argv && process.argv[2]) {
|
||||
inliner(process.argv[2], function (err, data) {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
process.stdout.write(data);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = inliner;
|
||||
|
||||
68
build/node_modules/inline-require/package.json
generated
vendored
Normal file
68
build/node_modules/inline-require/package.json
generated
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"_from": "inline-require",
|
||||
"_id": "inline-require@0.1.5",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-0TsqCpbh/c7vnmMo5I0jlL2c8Se2Xq0XqO5xWkHr+j5s6lSExSumtNg6kJyvVgDRpQDgEU30FGrR+DHEGE3xQw==",
|
||||
"_location": "/inline-require",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "tag",
|
||||
"registry": true,
|
||||
"raw": "inline-require",
|
||||
"name": "inline-require",
|
||||
"escapedName": "inline-require",
|
||||
"rawSpec": "",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "latest"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"#USER",
|
||||
"/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/inline-require/-/inline-require-0.1.5.tgz",
|
||||
"_shasum": "c02dffac526b0ba3fe628311ac306d7eff379230",
|
||||
"_spec": "inline-require",
|
||||
"_where": "/Users/asciidisco/Desktop/asciidisco.com/build",
|
||||
"author": {
|
||||
"name": "Maxwell Simmer",
|
||||
"email": "maxwell.simmer@gmail.com",
|
||||
"url": "http://maxwellsimmer.com"
|
||||
},
|
||||
"bin": {
|
||||
"inline-require": "./index.js"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/msimmer/inline-require/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Replace require'd files with the files' contents",
|
||||
"devDependencies": {
|
||||
"babel-cli": "^6.24.1",
|
||||
"babel-preset-es2015": "^6.24.1",
|
||||
"babel-preset-stage-0": "^6.24.1",
|
||||
"chai": "^4.1.0",
|
||||
"coveralls": "^2.13.1",
|
||||
"istanbul": "^0.4.5",
|
||||
"mocha": "^3.5.0",
|
||||
"rimraf": "^2.6.1",
|
||||
"should": "^11.2.1"
|
||||
},
|
||||
"homepage": "https://github.com/msimmer/inline-require#readme",
|
||||
"license": "ISC",
|
||||
"main": "index.js",
|
||||
"name": "inline-require",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/msimmer/inline-require.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "babel index.es --presets es2015,stage-0 > index.js",
|
||||
"coveralls": "NODE_ENV=coverage node_modules/.bin/istanbul cover --config .istanbul.yml node_modules/.bin/_mocha --report lcovonly tests && cat ./coverage/lcov.info | node_modules/.bin/coveralls && node_modules/.bin/rimraf ./coverage",
|
||||
"istanbul": "NODE_ENV=coverage node_modules/.bin/istanbul cover --config .istanbul.yml node_modules/.bin/_mocha tests",
|
||||
"prepublish": "yarn test",
|
||||
"preversion": "yarn test",
|
||||
"test": "yarn build && NODE_ENV=test mocha tests"
|
||||
},
|
||||
"version": "0.1.5"
|
||||
}
|
||||
1
build/node_modules/inline-require/tests/deps/array.js
generated
vendored
Normal file
1
build/node_modules/inline-require/tests/deps/array.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = [1,2,3]
|
||||
1
build/node_modules/inline-require/tests/deps/func.js
generated
vendored
Normal file
1
build/node_modules/inline-require/tests/deps/func.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = function foo() { return 'foo' }
|
||||
1
build/node_modules/inline-require/tests/deps/number.js
generated
vendored
Normal file
1
build/node_modules/inline-require/tests/deps/number.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = 1
|
||||
1
build/node_modules/inline-require/tests/deps/object.js
generated
vendored
Normal file
1
build/node_modules/inline-require/tests/deps/object.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = { foo: 'foo' }
|
||||
1
build/node_modules/inline-require/tests/deps/string.js
generated
vendored
Normal file
1
build/node_modules/inline-require/tests/deps/string.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = 'foo'
|
||||
2
build/node_modules/inline-require/tests/global-dependency.js
generated
vendored
Normal file
2
build/node_modules/inline-require/tests/global-dependency.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
const fs = require('fs')
|
||||
module.exports = {}
|
||||
13
build/node_modules/inline-require/tests/local-dependencies.js
generated
vendored
Normal file
13
build/node_modules/inline-require/tests/local-dependencies.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
const array = require('./deps/array')
|
||||
const object = require('./deps/object')
|
||||
const number = require('./deps/number')
|
||||
const string = require('./deps/string')
|
||||
const func = require('./deps/func')
|
||||
|
||||
module.exports = {
|
||||
array,
|
||||
object,
|
||||
number,
|
||||
string,
|
||||
func,
|
||||
}
|
||||
68
build/node_modules/inline-require/tests/test.js
generated
vendored
Normal file
68
build/node_modules/inline-require/tests/test.js
generated
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
const should = require('chai').should()
|
||||
const path = require('path')
|
||||
const exec = require('child_process').exec
|
||||
|
||||
const index = process.env.NODE_ENV == 'coverage' ? '../index.es' : '../index'
|
||||
const inline = require(index)
|
||||
|
||||
describe('inline-require', () => {
|
||||
it('should process local modules', (done) => {
|
||||
inline(path.join(__dirname, 'local-dependencies.js'), (err, contents) => {
|
||||
should.equal(err, null)
|
||||
contents.should.not.match(/require\('\./)
|
||||
done()
|
||||
})
|
||||
})
|
||||
it('should not process global modules', (done) => {
|
||||
inline(path.join(__dirname, 'global-dependency.js'), (err, contents) => {
|
||||
should.equal(err, null)
|
||||
contents.should.match(/require\('fs/)
|
||||
done()
|
||||
})
|
||||
})
|
||||
it('should preserve the types of inlined dependencies', (done) => {
|
||||
inline(path.join(__dirname, 'local-dependencies.js'), (err, contents) => {
|
||||
|
||||
const mod = eval(contents)
|
||||
|
||||
mod.should.have.property('array')
|
||||
mod.should.have.property('object')
|
||||
mod.should.have.property('number')
|
||||
mod.should.have.property('string')
|
||||
mod.should.have.property('func')
|
||||
|
||||
|
||||
mod.array.should.be.an('array').that.includes.all.members([1,2,3])
|
||||
mod.object.should.be.an('object').that.deep.equals({ foo: 'foo' })
|
||||
mod.number.should.be.a('number').that.equals(1)
|
||||
mod.string.should.be.a('string').that.equals('foo')
|
||||
|
||||
mod.func.should.be.a('function')
|
||||
mod.func().should.equal('foo')
|
||||
|
||||
done()
|
||||
})
|
||||
})
|
||||
it('should return an error if improper arguments are provided', () => {
|
||||
inline(null, err => err.should.be.an('Error') )
|
||||
inline({}, err => err.should.be.an('Error') )
|
||||
inline([], err => err.should.be.an('Error') )
|
||||
})
|
||||
it('should return an error if source file does not exist', (done) => {
|
||||
inline('./bogus', (err) => {
|
||||
err.should.be.an('Error')
|
||||
done()
|
||||
})
|
||||
})
|
||||
it('should return an error if a dependency does not exist', () => {
|
||||
// handled by native module loader
|
||||
})
|
||||
it('should run on the command line', (done) => {
|
||||
exec(`node ${index} ./local-dependencies.js`, { cwd: __dirname }, (err, stdout, stderr) => {
|
||||
should.equal(err, null)
|
||||
should.equal(stderr, '')
|
||||
stdout.should.match(/const array = \[1,2,3\]/)
|
||||
done()
|
||||
})
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user