#JS Starter
This project provides a good starting point for a JS project built with gulp.
###Get started
- Install Node
$ git clone https://github.com/wikiwong/js-scaffold
$ npm install
$ gulp
###Features
- node modules and commonjs/es6 module support (via browserify)
- es6 compilation to es5 (via babel)
- jsx compiliation (via babelify)
- eslint validation (via eslint)
- precommit hook to enforce eslint rules before commit (via precommit-hook)
- development server with auto reload (via browser-sync and livereactload)
- uglification of production js (via uglify)
###Preconfigured Gulp Tasks
clean
- deletes the/build
folder and all files within it.html
- copies all.html
files from/src
to/build
.lint
- runs eslint for all.js
and.jsx
files and displays results to stdout.serve
- starts a development server athttp://localhost.espn.go.com:3000
using/build
as the root file path.watch
-[clean, html]
+ builds a development js bundle in the/build
folder and begins watching for changes, automatically rebuilding the bundle when necessary.build
-[clean]
+ builds a production ready uglified js bundle.default
-[watch + serve]
###Eslint
eslint rules are defined in .eslintrc
and are a fork of Airbnb's, with modifications to support jsx validation.