mongodb-js tooling
Last updated 4 years ago by shum .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install mj 
SYNC missed versions from official npm registry.


mongodb-js tooling.


mongodb-js tooling.

   mj <command> [<args>...]
   mj --version
   mj -h | --help

   -h, --help     Print this help screen

Available commands are:
   help       Provide help on any command
   install    Install development tools for mongodb-js
   create     Create a new mongodb-js project from a template
   check      Check if all requirements are met and tests pass
   submit     Prepare submission of existing project to mongodb-js

See 'mj help <command>' for more information on a specific command.


npm install -g mj


npm test



To enable debugging, set the DEBUG environment variable to mj*:

DEBUG=mj:* mj check

Adding new commands

To add a new command foobar, follow these steps:

  1. add interface definition at ./docopts/foobar.docopt
  2. add implemenation at ./commands/foobar.js
  3. add reference to ./docopts/_main.docopt and ./docopts/help.docopt

./commands/foobar.js needs to export a function like so:

module.exports = function (args, done) {
  // your implementation goes here

where args is the already docopt-parsed result of your foobar.docopt definitions, and done is the callback function to be called when the command finishes. Note that no validation has been performed on args, other than it matched one of the defined docopt definitions.

Your command should call done() if everything was ok, or done(err) if there was an error.

Task Manager

This module comes with a task manager, that uses async.auto to handle a number of interdependent asynchronous tasks.

Each task defines zero or more dependencies, that need to be fulfilled first (make sure not to define circular dependencies). Each task also can return any number of results, which are available in the results object in dependent tasks.

The "demo" command shows how this feature can be used.


Apache 2.0

Current Tags

  • 1.0.5                                ...           latest (4 years ago)

5 Versions

  • 1.0.5                                ...           4 years ago
  • 1.0.4                                ...           5 years ago
  • 1.0.3                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago

Copyright 2014 - 2016 © taobao.org |