Add --keep-file-extension option to babel-cli (#6221)

* Add --keep-module-extension option to babel-cli

* Rename keep-module-extension option to keep-file-extension; Change option to preserve all file extensions
This commit is contained in:
Laurin Quast
2017-09-12 00:06:44 +02:00
committed by Justin Ridgewell
parent 4daf11528c
commit 8742012b5e
9 changed files with 30 additions and 1 deletions

View File

@@ -0,0 +1 @@
arr.map(x => x / DIVIDER);

View File

@@ -0,0 +1 @@
arr.map(x => x * MULTIPLIER);

View File

@@ -0,0 +1,3 @@
{
"args": ["src", "--out-dir", "lib", "--keep-file-extension"]
}

View File

@@ -0,0 +1,5 @@
"use strict";
arr.map(function (x) {
return x / DIVIDER;
});

View File

@@ -0,0 +1,5 @@
"use strict";
arr.map(function (x) {
return x * MULTIPLIER;
});

View File

@@ -0,0 +1,2 @@
src/bar.mjs -> lib/bar.mjs
src/foo.js -> lib/foo.js