Mod is a task-based workflow tooling for web, it help developers quickly build robust and high-performance web applications.
$ npm install modjs -g
Mod supports a powerful set of high-level tasks:
- help - get help on mod
- create - generate project skeleton and create project directory
- init - generate project skeleton from templates
- server - start a static web server
- pack - create a tarball from a module
- hash - rename file with it hash value
- build - build the project by convention
- replace - replace the contents of files
- cat - concatenate the content of files
- cp - copy one or more files to another location
- mkdir - create new folder
- mv - move or rename files or directories
- rm - remove files
- strip - source stripping
- exports.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.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).
- Concatenate JS Files
- Concatenate CSS Files
- CMD Modules Compile
- CSS Modules Compile
- HTML Precompile
- JPG Image Compression
- PNG Image Compression
- JS Minify
- CSS Minify
- Source Stripping
- Inline Images DataURI
- Plugin: CSS Images Sprites
- Custom: Hello ModJS
- More built-in tasks
- More simplicity to use
- Configuration less(even zero), do more
- Business background, community support
- Task-based builds
- Minify everything: JS, CSS, HTML, Images
- Source linting: JS, CSS
- Modular JS for the web: AMD, CMD(will support CommonJS soon)
- CSS import file combination
- HTML conditional comments for target build
- Source stripping, automatically remove debugging code
- Common action: cat, rm, mv, mkdir, cp, hash, pack
- File watcher, trigger custom tasks when file change
- Live Browser Reloads, instantly see changes in your browser
- Image Optimization, reduce JPEG, PNG and GIF file sizes
- Project boilerplate generate
- Built-in Web Server
- Extensible, easily write plugins
- Works on most platforms: Windows, Linux, Mac OS X, Unix...
| Feature | Mod | Grunt | Yeoman | |--------------------------+--------+------------+-----------| | Minifier | ✓ | ✓ | ✓ | | Linter | ✓ | ✓ | ✓ | | HTML Conditional Comments| ✓ | ✗ | ✗ | | CSS Combination | ✓ | ✗ | ✗ | | Image Optimization | ✓ | ✗ | ✓ | | Source stripper | ✓ | ✗ | ✗ | | Modular JS | ✓ | ✗ | ✗ | | File Watcher | ✓ | ✓ | ✓ | | Live Browser Reloads | ✓ | ✗ | ✓ | | Built-in WebServer | ✓ | ✓ | ✓ | | Skeletons (Boilerplates) | ✓ | ✓ | ✓ | | Headless browser Testing | ✗ | ✓ | ✓ | | Extensible plugins | ✓ | ✓ | ✓ | | Cross-platform | ✓ | ✓ | ✗ |
Mod support Windows, OS X, Linux.
Submit a new issue.
Used by people within (JOIN US)
Mod is released under a MIT license.