0.1.0 • Published 10 years ago
feb-es6 v0.1.0
FEB-ES6
Front-end boilerplate in ES6, using ReactJS by default.
New version FEB uses Gulp for build system. And old version FEB which leverages on Grunt can be found here.
Tools
Build System
- Gulp - Front-end task runner and build system.
Testing
Preprocessor
- CoffeeScript - JavaScript preprocessor.
- Less - CSS preprocessor.
Modular Development
- Browserify - A super powerful module system.
Basic Usage
NOTE: It assumes that Node.js and NPM have been installed in your system.
Install global dependencies,
$ npm install -g browserify gulpClone project and install development dependencies,
$ git clone https://github.com/livoras/feb.git
$ cd feb
$ npm installThen just fly,
$ gulpand open your browser to load http://localhost:8080/bin/index.html and change source codes of src.
How it works
After running the gulp command, things will happen:
- Copy HTML: HTML files directly placed in
srcwill be copied intobin. - Compile CoffeeSctipt : CoffeeScript files directly placed in
src/scriptswill be compiled to JS files which will be placed inbin/scripts. But note that files placed in subfolders ofsrc/scriptswon't be compiled but they can and should be required by 'entry' CoffeeScript placed directly insrc/scriptsthrough Browserify. - Compile Less: Less files placed in
src/stylsheetswill be compiled to CSS files which will be placed inbin/stylesheets. Just like CoffeeScrtipt, only 'naked' Less files will be compiled. - Copy libraries and static resources: Copy
lib/,assets/folder and all their contents intobin/. - Testing: Specs in
test/specswill be run and results will be shown in terminal. - Watch changes and livereload: Files's changes in
srcwill make gulp rerun tasks above. And if you start a local server and open your broswer to load pages inbin/, changes will trigger automatic refresh of browser if you have theLiveReloadplugin installed in your Chrome/Firefox.
Distribution
Use
$ gulp buildto bulid and minify all stuff. A dist folder will be created and ready for distribution.
Examples
TODO
License
Released under the MIT license.
0.1.0
10 years ago