Grunt-brew its a set of grunt tasks that help's you to develop faster frontend javascripts applications.
It provides the next features:
- Asset pipeline and precompilers like Jade, Sass with Compass and CoffeeScript. (No more HTML, js and css files)
- A build it server to test your application and with live reload that watch your files.
- A ES6 transpiler so you can try and test the new features of ECMAScript 6 (the next version of javascript)
- Convention Over Configuration
- Clone the git repository
- (Install nodejs)[http://nodejs.org/]
- (Install grunt)[http://gruntjs.com/getting-started]
- (Install bower)[http://bower.io/]
- npm install
- grunt bower:install
- grunt brew:server
- Visit http://0.0.0.0:3333
Create a file named .bowerrc
in your project's root directory and set your proxy
{
"directory": "bower_components",
"proxy": "http://192.168.5.1:8080",
"https-proxy": "http://192.168.5.1:8080"
}
By default the project has the next directory structure
app/
assets/
jade/
index.jade
dist/
tmp/
bower/
build/
public/
brew.config
app
: The main application watch directory any .coffee, .sass that you put in here it will be precompiled
app/assets
: Any file that you put in here it will be copied to the public directory, perfect for assets like images, fonts, etc.
app/jade
: Any .jade file in here it will be precompiled and copied to the public directory
dist
: This is the ouput folder for your precompiled application and vendor assets which by default are:
app.js
: Concatenated file of all your precompiled coffescript files inapp
directoryapp.min.js
: Minified version ofapp.js
bundle.js
: ES6 transpiled version of the your precompiled coffescript for you to requirebundle.min.js
: Minified version ofbundle.js
vendor.js
: Concatenated file of all the third party javascripts (bower, node_modules, or any file that you especify on the brew.config file under the vendor key)vendor.min.js
: Minified version ofvendor.js
app.css
: Concatenated file of all your precompiled sass files inapp
directoryapp.min.css
: Minified version ofapp.css
vendor.css
: Concatenated file of all the third party css especified on the brew.configvendor.min.css
: Minified version ofvendor.css
public
: the root (www) directory of the webserver application
tmp
: output directory for asset precompiles and grunt bower:install
The project has the brew.json
file to configure the main features such as directories, vendor files, etc. So you can customize it to suit your needs.