- To get Started fork and clone the repo to your local environment.
- Inside the root folder run command 'npm install'
- To kick off the main build run 'gulp dev'
- This is the main command to run in order to build the folder
- Inside the build folder run the command 'open index.html'
- This will open the file with your default browser
Gulp: Is a task runner which is doing all the work in the building the main build folder which is then able to be read by the browser
Babel: This is a preprocess which essentially converts all your code from ES6 to ES5
- The reason we need to do this is because modern browsers that people use don't currently have support for ES6
Babelify: This is essentially the bridge to enable babel to work with Browserify
- A key piece of this is enabling the ES6 module system to work
- Babelify basically converts the imports to requires and the exports to module.exports
Browserify: This is the main process which does all the dependency management and builds a single file essentially concatenating everything together
- Browserify has something called Transforms which allow you to run preprocesses before browserify builds the file
- The basic steps go like this
- Babel converts ES6 to ES5
- Babelify converts imports to requires
- Browserify builds the file with the files in the correct order
- Have one main.js file with everything built correctly to be used by the index.html