1.0.0 • Published 7 years ago

clivage v1.0.0

Weekly downloads
3
License
AGPL-3.0
Repository
github
Last release
7 years ago

clivage

Build Status Coverage Status Dependency Status

Command-line helper.

Install

With npm:

$ npm install --save clivage joi

With yarn:

$ yarn add clivage joi

Note that joi is a peer dependency.

Now with update-notifier

The module now uses update-notifier to let the user know about updates to this program.

Users have the ability to opt-out of the update notifier by changing the optOut property to true in ~/.config/configstore/update-notifier-YOUR-MODULE-NAME.json. The path is available in notifier.config.path.

Users can also opt-out by setting the environment variable NO_UPDATE_NOTIFIER with any value or by using the --no-update-notifier flag on a per run basis.

Usage

const clivage = require('clivage')


const schema = joi.object({
  port: joi.number().integer(),
  host: joi.string().optional(),
  user: joi.string().optional(),
  pw: joi.string().optional()
})
  .with('pw', 'user')
  .with('user', 'pw')

const cli = clivage(schema)
cli.flags

//=> { port: 1234, host: 'http://localhost:5984' }

API

clivage(options)

options

schema

Type: object (joi)

Lorem ipsum.

alias

Type: array

argv

Type: object

Lorem ipsum.

help

Type: string

Lorem ipsum.

prefix

Type: string

Lorem ipsum.

envPath

Type: string

Lorem ipsum.

License

AGPL-v3 © 2017 Robin Millette

1.0.0

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago