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
- 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.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).