Issue originally made by @jonathanong
Bug information
NODE_ENV=production ./node_modules/.bin/babel --source-maps inline common -d common
NODE_ENV=production ./node_modules/.bin/babel --source-maps inline lib -d lib
NODE_ENV=production ./node_modules/.bin/babel --source-maps inline modules -d modules
NODE_ENV=production ./node_modules/.bin/babel --source-maps inline server -d server
NODE_ENV=production ./node_modules/.bin/babel --source-maps inline scripts -d scripts
I'm using the above code to babelify all my server-side code in production. This is necessary because there is no "overwrite" functionality for the CLI. it would be nice if all i had to do was:
NODE_ENV=production ./node_modules/.bin/babel --source-maps inline --overwrite common lib modules server scripts
it could also be a lack of documentation on the CLI:
./node_modules/.bin/babel -h
Usage: babel [options] <files ...>
Options:
-h, --help output usage information
-f, --filename [filename] filename to use when reading from stdin - this will be used in source-maps, errors etc
--retain-lines retain line numbers - will result in really ugly code
--no-highlight-code enable/disable ANSI syntax highlighting of code frames (on by default)
--presets [list]
--plugins [list]
--ignore [list] list of glob paths to **not** compile
--only [list] list of glob paths to **only** compile
--no-comments write comments to generated output (true by default)
--compact [booleanString] do not include superfluous whitespace characters and line terminators [true|false|auto]
--minified save as much bytes when printing [true|false]
./node_modules/.bin/babel --version
6.8.0 (babel-core 6.8.0)
^ i no longer see sourcemaps or directories as options in the CLI, but i see it here: http://babeljs.io/docs/usage/cli/
i don't mind making PRs as long as you guys let me know:
--overwrite
option? What would you like the shortcut to be? Are you okay with the API I presented above?thanks
This would be great to have with TypeScript's tsc
and Babili CLI. With tsc
JS files get generated and I would like to minify those generated files with Babili without intermediate files.
Closing, out of scope for now.
Most helpful comment
This would be great to have with TypeScript's
tsc
and Babili CLI. Withtsc
JS files get generated and I would like to minify those generated files with Babili without intermediate files.