Grunt Tasks & Boilerplate Initializer tool.
Getting Started
Install this Grunt plugin with:
npm install -g plates
Commands
All commands are prefixed with plates
in your terminal. For example the command
init
below would be executed like this:
$ plates init
Scaffolding
These commands will build out files for you.
init
Not implemented: Creates a bare html5 boilerplate.
init:example
Not implemented: Creates a boilerplate which contains the example file.
init:backbone
Not implemented: Creates a backbone boilerplate.
init:bb-module
Not implemented: Creates a new backbone module in the app/modules
directory.
Maintenence
These commands help you maintain your project.
lint
Ensures all your code conforms to JSHint.
list
Not implemented:Shows a tree of your application's modules and dependencies.
Build
These commmands help you build your application.
debug
Lints all your JavaScript, compiles all your templates to JST (JavaScript Templates), builds your application using RequireJS build tool (figures out dependencies and concatenates all files), and then finally concatenates the templates and application together. This task also swaps out RequireJS for Almond (signficantly smaller filesize AMD manager).
release
Everything that debug command does, except the final tasks here are minified CSS and minified JavaScript.
clean
Cleans files and directories
handlebars
Not implemented:Compiles handlebars templates - this requires setup.
jst
Not implemented:Compiles all templates as underscore template functions and outputs them to
dist/debug/templates.js
.
less
Compiles LESS stylesheets.
mincss
Minifies your CSS into dist/release/index.css
.
'coffee'
Compiles your CS files into JS
'stylus'
Compiles your stylus files into css
'zip'
Zips a directory or files
'copy'
Copies files and directories
requirejs
Builds out your application using the defaults specified into the root
grunt.js
file.
server
Not implemented:Will by default run with normal files perfect for development and debugging.
server:debug
Not implemented:This command serves the same files excepts that your application is mapped to
the dist/debug
directory. This is mostly useful for detecting issues with the
build, since files are not minified.
server:release
Not implemented:This command will serve the same was debug except mapping to dist/release
instead. This setup is how your application should be deployed.
templatize
Not implemented: License
Copyright (c) 2012 Jody Brewster (@jodybrewster)
Licensed under the MIT license.