A CLI tool built on babel-core for compiling .js/.jsx files to ES6 with automatic source map generation, output directory cleaning, and configuration loading from NPM modules. Version 2.0.0 is the current stable release with low release cadence. It provides an alternative to the Babel CLI for batch compilation with extra features like source maps with correct file references and cleaning the output directory to avoid stale files. It requires a Babel preset (e.g., babel-preset-es2015).
npm install babel-compileVerified import paths — ran on the pinned version, not inferred.
Shows installation and basic usage of babel-compile CLI with es2015 preset, compiling src/ to lib/.
Install source-map-support and require it in your entry point.
Rename files to .js or .jsx, or use a different compiler.
Run: npm install babel-preset-es2015 --save-dev
Ensure babel-preset-es2015 (or appropriate preset) is installed and passed via -p option.