By liran bh | 1/4/2017 | JavaScript

ES6 build Environment

To create a build environment for javascript you can use many tools, IDEs, Editors. In this post I list required tools and where to find it.



1. Node.JS - install latest version


Update npm using:

npm install npm –g



2. Babel.js - create a new directory and run the following commands (using node command prompt or shell with configured path)

npm init
npm install --save-dev babel-cli
npm install babel-preset-es2015 --save-dev

create directories for src,lib  

update the package.json file to add the build command run:

  "name": "es2015",
  "version": "1.0.0",
  "description": "sample",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "build":"babel src -d lib"
  "keywords": [
  "author": "liran",
  "license": "MIT",
  "devDependencies": {
    "babel-cli": "^6.22.2",
    "babel-preset-es2015": "^6.22.0"

Add .babelrc file (note the leading dot) with the following:

  "presets": ["es2015"]

To build the code run:

npm run build

Now you can see the result on the lib directory 

{{CommentsModel.TotalCount}} Comments

Your Comment


Recent Stories

Top DiscoverSDK Experts

User photo
Ashton Torrence
Web and Windows developer
GUI | Web and 11 more
View Profile
User photo
Mendy Bennett
Experienced with Ad network & Ad servers.
Mobile | Ad Networks and 1 more
View Profile
User photo
Karen Fitzgerald
7 years in Cross-Platform development.
Mobile | Cross Platform Frameworks
View Profile
Show All

Compare Products

Select up to three two products to compare by clicking on the compare icon () of each product.


Now comparing:

{{product.ProductName | createSubstring:25}} X
Compare Now