Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Failed to load latest commit information.
api Update docs.
tasks Update docs.
template Global replace the old Mod.js repo url.
tutorial Update tutorial. Update docs.



Built-in Tasks

Mod supports a powerful set of high-level tasks:

  • help - get help on mod
  • build - build project with html
  • init - generate project skeleton from template
  • watch - run predefined tasks whenever watched files change
  • deploy - remote deployment via ssh
  • download - download resource from URI
  • compile - compile JavaScript/CSS/HTML source
  • min - minify JavaScript/CSS/HTML source
  • replace - replace the contents of files
  • cat - concatenate the content of files
  • cp - copy one or more files to another location
  • mkdir - make a new directory
  • mv - move or rename files or directories
  • rm - remove files
  • rev - rename file with it hash value
  • strip - source stripping


  • exports - The exports API
  • exports.file - There are many provided methods for reading and writing files, traversing the filesystem and finding files by matching globbing patterns. Many of these methods are wrappers around built-in Node.js file functionality, but with additional error handling, logging and character encoding normalization.
  • exports.utils - Miscellaneous utilities
  • exports.template - Compiles templates into strings
  • exports._ - Underscore provides 80-odd functions that support both the usual functional suspects: map, select, invoke — as well as more specialized helpers: function binding, javascript templating, deep equality testing, and so on. It delegates to built-in functions, if present, so modern browsers will use the native implementations of forEach, map, reduce, filter, every, some and indexOf.
  • exports.async - Async provides around 20 functions that include the usual 'functional' suspects (map, reduce, filter, each…) as well as some common patterns for asynchronous control flow (parallel, series, waterfall…). All these functions assume you follow the node.js convention of providing a single callback as the last argument of your async function.
  • exports.request - Simplified HTTP request method
  • exports.prompt - Using prompt is relatively straight forward. There are two core methods you should be aware of: prompt.get() and prompt.addProperties(). There methods take strings representing property names in addition to objects for complex property validation (and more).
Something went wrong with that request. Please try again.