Stopped developping on modjs and switched to chajs.org

JavaScript Workflow Tooling For Web Application

Installing: npm install modjs -g Version: NPM version


Features

Plugins Auto-installing

Extensible, easily write plugins

Generators

Project boilerplate generate

Modular JS Compile

AMD, CMD (will support ES6 Module, CommonJS Module soon)


CSS Optimization

@import file auto combination

Basic Operation

Support cat, rm, mv, mkdir, cp, rev

Source Minify

Reduce HTML, JS, CSS, JPEG, PNG file sizes


Source Stripping

Automatically remove debugging code

Build With Main HTML

Quick build without Modfile

Built-in Web Server

Quick start a static web server



Example

Write Modfile.js this:
module.exports = {
    tasks: {
        build: {
            src: "./index.html"
        }
    }
}
Run this:
$ mod
Get this:
 Running task build
  build ./index.html building...
  optimizecss img/icon.png > dist/img/icon.png
  rev dist/img/icon.png > dist/img/234394cd.icon.png
  optimizecss img/icon.png > dist/img/icon.png
  rev dist/img/icon.png > dist/img/234394cd.icon.png
  build css/main.css > dist/css/main.css
  rev dist/css/main.css > dist/css/f1fb1ed4.main.css
  build ./img/icon.png > dist/img/icon.png
  rev dist/img/icon.png > dist/img/234394cd.icon.png
  build js/foo.js > dist/js/foo.js
  rev dist/js/foo.js > dist/js/5619bfaa.foo.js
  build js/bar.js > dist/js/bar.js
  rev dist/js/bar.js > dist/js/bac07922.bar.js
  build js/baz.js,js/qux.js > dist/js/baz_qux_2_106.js
  rev dist/js/baz_qux_2_106.js > dist/js/d987b931.baz_qux_2_106.js
  build js/quux.js,js/corge.js > dist/js/quux_corge_2_109.js
  rev dist/js/quux_corge_2_109.js > dist/js/68f3f22f.quux_corge_2_109.js
  build ./index.html > dist/index.html

 βœ“ OK