--copy-ignored flag added to CLI (#10887)

* prevent ignored files in out dir

* added includeIgnore cli option

* Help text change

* Update packages/babel-cli/src/babel/options.js

Copy review.

Co-Authored-By: Brian Ng <bng412@gmail.com>

* review comments

* throw error if copyIgnored is used without ignore flag

* check for ignored files

* duplicate pathToPattern fn in babel/cli

* change implementation

* removed ignore option from cliOption

* added test case with ignore in config

* added test case with ignore in config

* review

Co-authored-by: Brian Ng <bng412@gmail.com>
This commit is contained in:
Raja Sekar
2020-01-10 03:03:37 +01:00
committed by Nicolò Ribaudo
parent 3af02f63de
commit 8415065d99
70 changed files with 165 additions and 7 deletions

View File

@@ -0,0 +1,3 @@
{
"ignore": ["src/foo"]
}

View File

@@ -0,0 +1,10 @@
{
"args": [
"src",
"--out-dir",
"lib",
"--copy-files",
"--include-dotfiles",
"--verbose"
]
}

View File

@@ -0,0 +1,2 @@
src/index.js -> lib/index.js
Successfully compiled 1 file with Babel.

View File

@@ -0,0 +1,10 @@
{
"args": [
"src",
"--out-dir",
"lib",
"--copy-files",
"--copy-ignored",
"--verbose"
]
}

View File

@@ -0,0 +1,2 @@
src/index.js -> lib/index.js
Successfully compiled 1 file with Babel.

View File

@@ -0,0 +1,3 @@
{
"ignore": ["src/foo"]
}

View File

@@ -0,0 +1,10 @@
{
"args": [
"src",
"--out-dir",
"lib",
"--copy-files",
"--copy-ignored",
"--verbose"
]
}

View File

@@ -0,0 +1,2 @@
src/index.js -> lib/index.js
Successfully compiled 1 file with Babel.

View File

@@ -0,0 +1,9 @@
{
"args": [
"src",
"--out-dir",
"lib",
"--copy-files",
"--verbose"
]
}

View File

@@ -0,0 +1,3 @@
"use strict";
index;

View File

@@ -0,0 +1,2 @@
src/index.js -> lib/index.js
Successfully compiled 1 file with Babel.

View File

@@ -0,0 +1,3 @@
{
"ignore": ["src/foo"]
}

View File

@@ -0,0 +1,9 @@
{
"args": [
"src",
"--out-dir",
"lib",
"--copy-files",
"--verbose"
]
}

View File

@@ -0,0 +1,3 @@
"use strict";
index;

View File

@@ -0,0 +1,2 @@
src/index.js -> lib/index.js
Successfully compiled 1 file with Babel.

View File

@@ -0,0 +1,12 @@
{
"args": [
"src",
"--out-dir",
"lib",
"--copy-files",
"--ignore",
"src/foo",
"--copy-ignored",
"--verbose"
]
}

View File

@@ -0,0 +1,3 @@
"use strict";
index;

View File

@@ -0,0 +1,2 @@
src/index.js -> lib/index.js
Successfully compiled 1 file with Babel.

View File

@@ -0,0 +1,12 @@
{
"args": [
"src",
"--out-dir",
"lib",
"--copy-files",
"--only",
"src/foo/*",
"--copy-ignored",
"--verbose"
]
}

View File

@@ -0,0 +1,3 @@
"use strict";
bar;

View File

@@ -0,0 +1,2 @@
src/foo/bar.js -> lib/foo/bar.js
Successfully compiled 1 file with Babel.