Nodetiles framework tool.
Install this Grunt plugin with:
npm install -g nodetiles
To test installation, run the nodetiles
command. You should see something like
this:
All commands are prefixed with nodetiles
in your terminal. For example the command
init
below would be executed like this:
$ nodetiles init
Tasks are defined inside the grunt-nodetiles project, but also borrowed from other grunt projects: grunt-contrib & grunt-jasmine-task
If you have problems with borrowed tasks, please file issues on the respective projects.
These commands will build out files for you.
Creates a bare boilerplate project.
These commands help you maintain your project.
Ensures all your code conforms to JSHint.
Shows a tree of your application's modules and dependencies.
These commmands help you build your application.
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).
Everything that debug command does, except the final tasks here are minified CSS and minified JavaScript.
Removes all files inside dist/
directory.
Compiles handlebars templates - this requires setup.
Compiles all templates as underscore template functions and outputs them to
dist/debug/templates.js
.
Compiles LESS stylesheets.
Minifies your CSS into dist/release/index.css
.
Builds out your application using the defaults specified into the root
grunt.js
file.
Will by default run with normal files perfect for development and debugging.
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.
This command will serve the same was debug except mapping to dist/release
instead. This setup is how your application should be deployed.
Parses a valid CSS file for @imports
and concatenates them into an output
file. Will automatically build stylus files as it encounters them.
Sample configuration:
styles: {
// Output stylesheet file.
"dist/debug/index.css": {
// Main CSS source file, containing the @imports.
src: "assets/css/index.css",
// Relative path for `@imports`.
paths: ["assets/css"],
// Add additional stylesheets.
additional: ["assets/css/production-fixes.css"]
}
},
If you wish to contribute or just want to install from source, simply run the following commands:
# Clone the repository.
git clone git://github.com/nodetiles/grunt-nodetiles.git
# Change directory into it.
cd grunt-nodetiles
# Update all the submodules recursively.
git submodule update --init --recursive
# Allow nodetiles to be globally accessible.
sudo npm link
Copyright (c) 2012 Tim Branyen (@tbranyen)
Licensed under the MIT license.