Running scripts with npm
Command line shortcuts can be defined in a package.json file in a “scripts” object. This is used to combine multiple command line instructions in one command. These shortcuts can be executed from the terminal with the
npm run command. For example, a script command named
"build" can be executed with
npm run build.
Babel Package Installation
-D in the command line instruction like
npm install -D babel-preset-env to be installed as development dependency.
ES5 & ES6 Compatibility
npm install, all the listed packages and their dependencies will be installed.
Babel configuration file
Babel build process
Babel uses the
Node Package Manager
Caniuse.com for checking browser support
For instance, you can find out what percent of browsers support specific features in ES6, as covered in the “Browser compatibility and transpilition” lesson.