4. All the repetitive chores...
● Compile LESS, SASS,
Stylus, CoffeeScript,
etc.
● JSHint / JSLint
● Concatenate and
minify scripts and
styles
● Run with different
settings for
development and
“builds”
● Automatically
generate sprite
sheets
● Deploy using git, ftp,
scp or rsync
● Live reload in the
browser
● Compress images
14. All NPM packages (Grunt and it’s plugins) get installed in
`node_modules/`
Add this directory to .gitignore to prevent repo bloat
New developers can install all dependencies with `npm install` in the
project dir
15. fancy trick to autoload
all grunt plugins
Gruntfile.js — the secret sauce
(example from http://mattbanks.me/grunt-wordpress-development-deployments/)
21. For theme and plugin development, keep grunt stuff in the
theme/plugin folder
22. Supercharge your whole site
● Use one Gruntfile for the entire site
● Combine CSS and JS from multiple plugins and
your theme — speeds up your site!
Best when:
● you have complete control over site code
● you want to use grunt for deployment
23. Grunt stuff is in the
top-level folder
with the other
developer files
This whole folder
can be safely
deployed without
writing out long
lists of ignored files
for your deploy system
WordPress in a
subdirectory