- Create a new Empty web site in VS 2015
- Delete the web.config file
- Create 2 folders – src, lib, add the following test1.js file to src:
123console.log("hello");var y = [1, 2, 3].map(n => n + 1);console.log(y); - Install node.js
- On the node.js command prompt (in the project directory): o npm init
12# npm install --save-dev babel-cli# npm install babel-preset-es2015 --save-dev
- Add the following command to the scripts section in package.json: o “build”:”babel src -d lib”
- Create .babelrc file (note the leading dot)
-
12345{"presets": ["es2015"]}
- Test your work