render-help
Creates a nice output for a CLI --help
Last updated 7 years ago by zkochan .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install render-help 
SYNC missed versions from official npm registry.

render-help

Creates a nice output for a CLI --help

npm version

Installation

<pnpm|yarn|npm> add render-help

Usage

const renderHelp = require('./lib')

const output = renderHelp({
  usages: ['pnpm install [options]'],
  aliases: ['i'],
  description: 'Install all dependencies',
  descriptionLists: [
    {
      title: 'Options',
      list: [
        {
          name: '--force',
          shortAlias: '-f',
          description: 'Do some dangerous things'
        },
        {
          name: '--lockfile-only',
          description: "Don't create node_modules. Just generate pnpm-lock.yaml"
        }
      ]
    }
  ],
  url: 'https://pnpm.js.org/en/cli/install'
})
console.log(output)
// Usage: pnpm install [options]
//
// Alias: i
//
// Install all dependencies
//
// Options:
//   -f, --force               Do some dangerous things
//       --lockfile-only       Don't create node_modules. Just generate pnpm-lock.yaml
//
// Visit https://pnpm.js.org/en/cli/install for documentation about this command.

License

MIT © Zoltan Kochan

Current Tags

  • 1.0.2                                ...           latest (5 years ago)
  • 1.0.2                                ...           next (5 years ago)

4 Versions

  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
  • 0.0.0                                ...           7 years ago

Copyright 2013 - present © cnpmjs.org | Home |