Created
November 12, 2017 15:08
-
-
Save TommyZG/b91f406a6266c560968aaf0a5515ea3a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Initialize your project using npm init (in project folder) and create a directory called src | |
//Install babel dependencies by running | |
npm install babel-cli -D | |
npm install babel-preset-env -D | |
//Create a .babelrc file inside your project and add the following code inside it: | |
{ | |
"presets": ["env"] | |
} | |
//Add the following script to your scripts object in package.json: | |
"build": "babel src -d lib" | |
//Run npm run build whenever you want to transpile your code from your src to lib directories. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment