babel-cli
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
babel-core | 6.26.3 | 23.21 kB | MIT | prod | 1 3 |
babel-polyfill | 6.26.0 | 129.23 kB | MIT | prod | 2 |
babel-register | 6.26.0 | 4.24 kB | MIT | prod | 1 3 |
babel-runtime | 6.26.0 | 13.06 kB | MIT | prod | 2 |
chokidar | 1.7.0 | 22.33 kB | MIT | prod optional | 8 2 |
commander | 2.20.3 | 18.26 kB | MIT | prod | |
convert-source-map | 1.9.0 | 3.91 kB | MIT | prod | |
fs-readdir-recursive | 1.1.0 | 1.98 kB | MIT | prod | |
glob | 7.2.3 | 15.08 kB | ISC | prod | |
lodash | 4.17.21 | 311.49 kB | MIT | prod | |
output-file-sync | 1.1.2 | 1.71 kB | MIT | prod | |
path-is-absolute | 1.0.1 | 1.84 kB | MIT | prod optional | |
slash | 1.0.0 | 1020 B | MIT | prod | |
source-map | 0.5.7 | 185.31 kB | BSD-3-Clause | prod optional | |
v8flags | 2.1.1 | 3.87 kB | MIT | prod |
Babel-cli is a command-line interface for Babel, a renowned JavaScript compiler. Its main function is to transform your ES2015+ code into a backward compatible version of JavaScript that can be run by older JavaScript engines. Babel-cli achieves this by using plugins to transform the source code into a version that's compatible with older environments.
Using babel-cli involves a two-step process: installation and usage. First, you install babel-cli in your project with the npm package manager using the following command in your terminal:
npm install --save-dev babel-cli
After successful installation, you can then use the package to convert your modern JavaScript file into a version that's widely supported. Here's an example:
babel script.js
In this command, replace "script.js" with the name of your JavaScript file. Once you run the command, babel-cli will transform your ES2015+ code in 'script.js' file into backward-compatible JavaScript.
You can find more advanced details and options for using babel-cli in the official Babel documentation. Visit Babel CLI documentation to get more in-depth understanding and explore all the capabilities and configurations possible with babel-cli. The documentation covers all functionality including command-line options, usage examples, and more in a comprehensive and easy-to-understand manner.