Sign In

lope-cli

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lope-cli

Transform NPM package scripts into simple CLIs

Source
npmnpm
Version
0.2.0
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

lope-cli | Transform NPM package scripts into simple CLIs

version versioning branching styling paradigm build

Transform NPM package scripts into simple CLIs. Optionally, tap into NPM configs to pass options to said scripts. Check out lope-example for a basic package.json example.

Install

$ npm install --global lope-cli

Usage

Transform NPM package scripts into simple CLIs

Usage:
  $ lope [package] <script> [--global|-g] [--* <*>]

Options:
  --global, -g  Indicates the package is installed globally

Examples:
  $ lope test
  $ lope lope-example test
  $ lope lope-example test --global
  $ lope echo --echo hello
  $ lope lope-example echo --echo hello
  $ lope lope-example echo --echo hello --global

Local package via the command line:

$ npm install lope-example
$ lope lope-example test
$ lope lope-example echo --echo hello
hello

Local package, leveraging npm config, via the command line:

$ npm install lope-example
$ npm config set lope-example:echo hello
$ lope lope-example test
$ lope lope-example echo
hello

Local package via NPM script:

{
  "devDependencies": {
    "lope-cli": "0.0.x",
    "lope-example": "0.0.x"
  },
  "scripts": {
    "echo": "lope lope-example echo --echo hello",
    "test": "lope lope-example test"
  }
}
$ npm run test
$ npm run echo
hello

Global package via the command line:

$ npm install --global lope-example
$ lope lope-example test --global
$ lope lope-example echo --echo hello --global
hello

Global package, leveraging npm config, via the command line:

$ npm install --global lope-example
$ npm config set lope-example:echo hello
$ lope lope-example test --global
$ lope lope-example echo --global
hello

Self-referencing package via the command line:

{
  "scripts": {
    "echo": "echo ${npm_package_config_echo}",
    "test": "true"
  }
}
$ lope test
$ lope echo --echo hello
hello

Self-referencing package via NPM script:

{
  "devDependencies": {
    "lope-cli": "0.0.x"
  },
  "scripts": {
    "echo": "echo ${npm_package_config_echo}",
    "echo2": "lope echo --echo hello"
  }
}
$ npm run echo2
hello

Maintainers

  • Rocky Madden (@rockymadden)

Keywords

cli

FAQs

Package last updated on 17 Mar 2017

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