An excerpt from http://www.sitepoint.com/setting-up-es6-project-using-babel-browserify/, by Ritesh Kumar
In this article, I’ll show you how to set up a project that integrates Babel and Browserify to write modern code that can be executed by older browsers as well. Babel compiles ES6 code into ES5 which is supported by many browsers, including old ones like Internet Explorer 9, and Browserify is a tool for writing code that follows the CommonJS pattern and packaging it to be used in the browser.
Creating the package.json File
First of all, let’s see the folder structure of the demo we are going to make
/ |-- dist/ |-----modules.js |-- modules/ |-----import.js |-----index.js |--Gruntfile.js |--package.json
In the project’s root folder, there are two files
package.json and two folders modules and dist. The modules folder contains all the modules written in ES6 and the
.gitignore as it is just a utility file which in no way affects the project.
Now, let’s start by creating the
package.json file. There are many fields in a typical
package.json file like
author, and others, but in this project we’re only using the important ones.
Continue reading this article on SitePoint