New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

easy-commander

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

easy-commander

This is a framework that allows you to create clis quickly and easily, based on commander.

latest
Source
npmnpm
Version
0.0.3
Version published
Weekly downloads
13
333.33%
Maintainers
1
Weekly downloads
 
Created
Source

Easy Commander

easy-commander is a framework that allows you to create clis quickly and easily, based on commander.

Installation

npm i --SAVE easy-commander or yarn add easy-commander

Quick Start

  • import {cmdMaker, ICmd} from "easy-commander";.
  • Create your <Cmd_Blob> of interface ICmd.
  • Using method cmdMaker.append({<Cmd_Name> : <Cmd_Blob> }) to load it.
  • If you would like to add more, there are 3 ways:
    • add more <Cmd_Blob> in the input structure cmdMaker.append({ a: blob1, b: blob2, ... })
    • pipe the method append cmdMaker.append({ a: blob1 }).append({ b: blob2 })
    • both
  • Finally, call cmdMaker.start()

Advanced Usages

  • get commander

    cmdMaker.commander

  • to apply custom setting of command

    cmdMaker.custom(cmd => { ... })

  • set version when start

    cmdMaker.start({ version: "0.1.0", ... })

  • set fallback method when start

    cmdMaker.start({ cbFallback: ()=> { /** do sth. */ }, ... })

Usage Examples

  • basic usage

Keywords

commander

FAQs

Package last updated on 20 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts