Node ES6 Babel Study notes

Source: Internet
Author: User

NPM Install Babel-cli-g//Installing BabelBabel Index.js-O A.js//equivalent to Babel index.js--out-file a.js copy index.js to A.jsBabel src/-D build///equivalent to Babel src/--out-dir build/Copy all files under the SRC directory into the build directory//------------------------------//The Babel command is placed in the Pageage for easy invocationPackage.json ="Scripts": {     "Test":"echo \ "Error:no test specified\" && exit 1",     "Build":"Babel src/-D build/"//equivalent to Babel src/--out-dir build/Copy all files under the SRC directory into the build directory},NPM Run Build//------------------------------NPM Install babel-preset-es2015--save-dev//Note: It is important to use the "Local installation" to install the error when the conversion is installed Babel converter es6-es5Touch. BABELRC =//setting up a. BABELRC configuration file    {       "Presets":["es2015"]}NPM Run Build//once configured, running the-d command will convert ES6 to ES5   

Node ES6 Babel Study notes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.