This project provides a basis for a JavaScript UI (just the client-side). It provides:
- Gulp simple config
- Browserify
- Example how to include underscore/jquery libraries
- Tasks for compiling js, less, and rebuilding
app/public -> HTML assets
app/public/assets/js -> Image assets
app/public/assets/css -> CSS assets
app/src/js -> Source JS script
app/src/js/lib -> Source shared JS libs
app/src/less -> Source Less files
gulpfile.js -> The Gulp build definition
package.json -> The NPM build definition
-
Git clone this repo
-
Install Gulp globally to run on terminal
npm install -g gulp
-
Install Browserify globally to run on terminal
npm install -g browserify
-
Install the dependencies with npm:
npm install Note: This will install Gulp and Browserify locally to work together, and Underscore and JQuery example dependencies.
-
Create bundle.js manually
Eg: browserify src/js/main.js -o public/assets/js/bundle.js
-
Run example with http-server for example
npm install -g http-server on app/public http-server -p [port]
-
Run js compile task
gulp compile-js
-
Run css compile task
gulp compile-css
-
Run watch task
gulp watch