Merge branch 'master' into 7.0
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
/* eslint indent: 0 */
|
||||
|
||||
/**
|
||||
* This tiny wrapper file checks for known node flags and appends them
|
||||
* when found, before invoking the "real" _babel-node(1) executable.
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
/* eslint max-len: 0 */
|
||||
|
||||
require("babel-core");
|
||||
|
||||
const fs = require("fs");
|
||||
const commander = require("commander");
|
||||
@@ -38,6 +35,7 @@ Object.keys(options).forEach(function (key) {
|
||||
commander.option(arg, desc.join(" "));
|
||||
});
|
||||
|
||||
/* eslint-disable max-len */
|
||||
commander.option("-x, --extensions [extensions]", "List of extensions to compile when a directory has been input [.es6,.js,.es,.jsx]");
|
||||
commander.option("-w, --watch", "Recompile files on changes");
|
||||
commander.option("--skip-initial-build", "Do not compile files before watching");
|
||||
@@ -45,6 +43,7 @@ commander.option("-o, --out-file [out]", "Compile all input files into a single
|
||||
commander.option("-d, --out-dir [out]", "Compile an input directory of modules into an output directory");
|
||||
commander.option("-D, --copy-files", "When compiling a directory copy over non-compilable files");
|
||||
commander.option("-q, --quiet", "Don't log anything");
|
||||
/* eslint-enable max-len */
|
||||
|
||||
const pkg = require("../../package.json");
|
||||
commander.version(pkg.version + " (babel-core " + require("babel-core").version + ")");
|
||||
|
||||
@@ -46,7 +46,8 @@ const assertTest = function (stdout, stderr, opts) {
|
||||
|
||||
if (opts.stderr) {
|
||||
if (opts.stderrContains) {
|
||||
assert.ok(includes(stderr, expectStderr), "stderr " + JSON.stringify(stderr) + " didn't contain " + JSON.stringify(expectStderr));
|
||||
assert.ok(includes(stderr, expectStderr), "stderr " + JSON.stringify(stderr) +
|
||||
" didn't contain " + JSON.stringify(expectStderr));
|
||||
} else {
|
||||
chai.expect(stderr).to.equal(expectStderr, "stderr didn't match");
|
||||
}
|
||||
@@ -60,7 +61,8 @@ const assertTest = function (stdout, stderr, opts) {
|
||||
|
||||
if (opts.stdout) {
|
||||
if (opts.stdoutContains) {
|
||||
assert.ok(includes(stdout, expectStdout), "stdout " + JSON.stringify(stdout) + " didn't contain " + JSON.stringify(expectStdout));
|
||||
assert.ok(includes(stdout, expectStdout), "stdout " + JSON.stringify(stdout) +
|
||||
" didn't contain " + JSON.stringify(expectStdout));
|
||||
} else {
|
||||
chai.expect(stdout).to.equal(expectStdout, "stdout didn't match");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user