Skip to content

cscss666/mod

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

250 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mod - Modern project management and comprehension tool for the web Build Status

screenshot

What is Mod?

Mod is a task-based workflow tooling for web, it help developers quickly build robust and high-performance web applications.

Installation

Mod is installed using NPM(Node Package Manager)

$ npm install modjs -g

Website

Tutorials

Built-in Tasks

Mod supports a powerful set of high-level tasks:

  • help - get help on mod
  • min - minify JavaScript/CSS/HTML/Image source
  • lint - validate JavaScript/CSS source
  • compile - compile JavaScript/CSS/HTML source
  • 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

API

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

Wiki

Quick Build Demo

IDE Support

Simple Examples

Why another one?

  • More built-in tasks
  • More simplicity to use
  • Configuration less(even zero), do more
  • Business background, community support

Features

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

Compression Table

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

Platform Support

Mod support Windows, OS X, Linux.

Issue Submission

Submit a new issue.

About

Mod is an open-source project by Tencent which builds on top of Node.js. We utilize a number of useful open-source solutions including:

  • UglifyJS
  • JSHint
  • CleanCSS
  • CSSLint
  • HTMLMinifiler
  • RequireJS
  • SeaJS
  • OptiPNG
  • JPEGtran

Used by people within (JOIN US)

qqfind qqconnect

License

Mod is released under a MIT license.

About

Modern Workflow Tooling For Web

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • JavaScript 97.2%
  • CSS 1.5%
  • HTML 1.3%