@jsspec/cli-options

0.0.8 • Public • Published

@jsspec/cli-options

Travis AppVeyor

Command line options parser for jsspec.

Example:

const CLIOptions = require('@jsspec/cli-options')

options = {
  random: { alias: 'R', type: Boolean, required: false, default: true },
  require: { alias: 'r', type: Array, required: false, default: [] },
  format: { alias: 'f', type: String, required: false, default: 'documentation' },
  files: { type: Array, required: false, default: [] }
};

const cliOptions = new CLIOptions(process.argv.slice(2), options, 'files');
const settings = cliOptions.settings;

console.log(cliOptions.errors.join('\n'));

Package Sidebar

Install

npm i @jsspec/cli-options

Weekly Downloads

0

Version

0.0.8

License

ISC

Unpacked Size

5.78 kB

Total Files

5

Last publish

Collaborators

  • hookyqr