A basic template for front-end development using Node.js
Make sure you have installed the following:
I think there's enough installation material about all that on the web, so I won't make a how-to-install for this dependencies. After you have all that set, you can carry on.
git clone https://github.com/renancouto/front-template
npm install
grunt {environment}
use prod or dev as environments
grunt views:{environment}
grunt scripts
grunt styles:{environment}
grunt images:{environment}
Generate static HTML files using Handlebars as the template engine
grunt assemble:{environment}
Creates the server
grunt connect
Generate the stylesheets using SASS preprocessor
grunt sass:{environment}
Add vendor-prefixes for the generated CSS (postprocessor).
grunt autoprefixer
Cleans the DIST folder
grunt clean:all
Only styles
grunt clean:styles
Only scripts
grunt clean:scripts
Only html files (views) no the root
grunt clean:views
Only images
grunt clean:images
Copy files from SRC to DIST folder
grunt copy
Prettifies html files on the DIST folder
grunt prettify
Minifies html files on the DIST folder
grunt minify
Verifies file's extensions and throw errors on uppercases
grunt verifylowercase
Minify images
grunt imagemin:{environment}
Watch for file changes and reload the page (livereload)
grunt watch