- Watch for changes in .scss and .js
- Compile .scss
- Lint, concatenate and minify .js
- Optimize images (See "Additional Tasks" below)
First, make sure the Grunt CLI
and grunt-init
are installed globally.
`npm install -g grunt-cli`
`npm install -g grunt-init`
Second, clone the grunt-init
template locally:
`git clone git@github.com:radarseven/grunt-boilerplate.git ~/.grunt-init/codekitkillah`
Now, cd
into your project directory.
Initialize codekitkillah
(note codekitkillah
could be any name you desire):
`grunt-init codekitkillah`
Install all dependencies in package.json
. (Note, you may need to run as sudo
user):
`npm install`
To begin watching .js
and .scss
files run Grunt:
`grunt watch`
To optimize images run:
`grunt imagemin`
This will optimize all images in /assets/img/
and save them to /assets/img/min/
.
- Solution to handle javascript plugins