menhera-cli
a cli plugin for menhera
Last updated a year ago by vaiii .
MIT · Original npm · Tarball · package.json
$ cnpm install menhera-cli 
SYNC missed versions from official npm registry.

Menehra-CLI

a cli plugin for menhera

Use for CLI Tools

$ yarn global add menhera-cli

Install Template

$ mhr e init:cli
$ mhr e init:module

Use For Module

$ yarn add menhera menhera-cli

example

// index.js
const mhr = require("menhera").default;
const CLI = require("menhera-cli");

const Foo = CLI({ name: "Foo", version: "0.0.1" });

mhr.$use({
  _mount: {
    Foo
  },
  Foo: {
    commands: {
      _: {
        options: {
          test: { alias: "t", desc: "test", default: null }
        },
        exec({ _, _key, env }) {
          if (env.NONE_INPUTS) {
            _.$use({ Foo: { help: _key } });
          }
        }
      },
      foo: {
        desc: "Test foo",
        args: ["foo", "foo1"],
        examples: {
          foo: "foo 123"
        },
        exec({ foo }) {
          console.log(foo);
        }
      },
      bar: {
        desc: "Test bar",
        args: ["bar"],
        examples: {
          bar: "bar 456"
        },
        exec({ bar }) {
          console.log(bar);
        }
      }
    },
    config: {
      start: true
    }
  }
});


$ node index.js

preview

preview

Current Tags

  • 0.3.6                                ...           latest (a year ago)

75 Versions

  • 0.3.6                                ...           a year ago
  • 0.3.5-rc4                                ...           a year ago
  • 0.3.5-rc3                                ...           a year ago
  • 0.3.5-rc2                                ...           a year ago
  • 0.3.5-rc1                                ...           a year ago
  • 0.3.4                                ...           a year ago
  • 0.3.3-rc4                                ...           a year ago
  • 0.3.3-rc3                                ...           a year ago
  • 0.3.3-rc2                                ...           a year ago
  • 0.3.3-rc1                                ...           a year ago
  • 0.3.2                                ...           a year ago
  • 0.3.1-rc7                                ...           a year ago
  • 0.3.1-rc6                                ...           a year ago
  • 0.3.1-rc5                                ...           a year ago
  • 0.3.1-rc4                                ...           a year ago
  • 0.3.1-rc3                                ...           a year ago
  • 0.3.1-rc2                                ...           a year ago
  • 0.3.1-rc1                                ...           a year ago
  • 0.3.1-rc                                ...           a year ago
  • 0.3.0                                ...           a year ago
  • 0.2.9-rc6                                ...           a year ago
  • 0.2.9-rc5                                ...           a year ago
  • 0.2.9-rc4                                ...           a year ago
  • 0.2.9-rc3                                ...           a year ago
  • 0.2.9-rc2                                ...           a year ago
  • 0.2.9-rc1                                ...           a year ago
  • 0.2.8                                ...           a year ago
  • 0.2.7                                ...           a year ago
  • 0.2.6                                ...           a year ago
  • 0.2.5                                ...           a year ago
  • 0.2.5-rc6                                ...           a year ago
  • 0.2.5-rc5                                ...           a year ago
  • 0.2.5-rc4                                ...           a year ago
  • 0.2.5-rc3                                ...           a year ago
  • 0.2.5-rc2                                ...           a year ago
  • 0.2.5-rc1                                ...           a year ago
  • 0.2.4                                ...           a year ago
  • 0.2.4-rc9                                ...           a year ago
  • 0.2.4-rc8                                ...           2 years ago
  • 0.2.4-rc7                                ...           2 years ago
  • 0.2.4-rc6                                ...           2 years ago
  • 0.2.4-rc5                                ...           2 years ago
  • 0.2.4-rc4                                ...           2 years ago
  • 0.2.4-rc3                                ...           2 years ago
  • 0.2.4-rc2                                ...           2 years ago
  • 0.2.4-rc1                                ...           2 years ago
  • 0.2.3                                ...           2 years ago
  • 0.2.2-rc1                                ...           2 years ago
  • 0.2.2                                ...           2 years ago
  • 0.2.1-rc1.4                                ...           2 years ago
  • 0.2.1-rc1.3                                ...           2 years ago
  • 0.2.1-rc1.2                                ...           2 years ago
  • 0.2.1-rc1.1                                ...           2 years ago
  • 0.2.1-rc1                                ...           2 years ago
  • 0.2.1-fix                                ...           2 years ago
  • 0.2.1                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
  • 0.1.9                                ...           2 years ago
  • 0.1.8                                ...           2 years ago
  • 0.1.7                                ...           2 years ago
  • 0.1.6                                ...           2 years ago
  • 0.1.5                                ...           2 years ago
  • 0.1.4                                ...           2 years ago
  • 0.1.3                                ...           2 years ago
  • 0.1.2                                ...           2 years ago
  • 0.1.1                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
  • 0.0.9                                ...           2 years ago
  • 0.0.8                                ...           2 years ago
  • 0.0.7                                ...           2 years ago
  • 0.0.6                                ...           2 years ago
  • 0.0.5                                ...           2 years ago
  • 0.0.4                                ...           2 years ago
  • 0.0.3                                ...           2 years ago
  • 0.0.2                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 2
Last Month 7
Dependencies (13)
Dev Dependencies (6)

Copyright 2014 - 2017 © taobao.org |