Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make dir for babel --out-file (#8622)
* Make dir for babel --out-file Currently there's unexpected regression after upgrade from babel 6. On creating file with any depth like dist/index.js the error about not existing directory is thrown. In this diff I modified babel-cli to create deep directory for out-file command. I also replaced `mkdirp` with more supported `make-dir` package which also have official promise support. * Fix test
- Loading branch information
1 parent
4e5ac1f
commit be0fcaa
Showing
8 changed files
with
18 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/babel-cli/test/fixtures/babel/filename --out-file deep/in-files/script.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
arr.map(x => x * MULTIPLIER); |
3 changes: 3 additions & 0 deletions
3
packages/babel-cli/test/fixtures/babel/filename --out-file deep/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"args": ["script.js", "--out-file", "folder/nested/script.js"] | ||
} |
5 changes: 5 additions & 0 deletions
5
.../babel-cli/test/fixtures/babel/filename --out-file deep/out-files/folder/nested/script.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
"use strict"; | ||
|
||
arr.map(function (x) { | ||
return x * MULTIPLIER; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters