0.0.6 • Published 2 years ago

cli-footer v0.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Create a CLI help footer to use with meow and meow-cli-help

The footer supplies help text for boolean flags that default to true Example: --no-clear, --no-debug, etc.

cli-footer

Install

npm install cli-footer

Usage

import makeFooter from 'cli-footer'

const flags = {
  beer: {
    type: `boolean`,
    default: true,
    desc: `Print a beer to the console`,
  },
  fear: {
    type: `boolean`,
    default: true,
    desc: `Share your fears with the console`,
  },
  steer: {
    type: `boolean`,
    default: true,
    desc: `Pass the wheel to the console`,
  },
}

// See screenshot below for output
const footer = makeFooter('cli-cmd', flags)

cli-footer output screenshot

API

footer(command, flags, NUM_EXAMPLES)

❯ command

Type: string Required

The name of the command to show in the example

❯ flags

Type: object Required

The flags that will be passed to cli-meow-help

❯ NUM_EXAMPLES

Type: integer Default: 3 Optional

Number of flags to include in the example

KEY: 📦 NEW, 👌 IMPROVE, 🐛 FIX, 📖 DOC, 🚀 RELEASE, and 🤖 TEST

I use Emoji-log, you should try it and simplify your git commits.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.