yo-option-or-prompt

0.2.0 • Public • Published

yo-option-or-prompt

Beerpay Beerpay GitHub stars

Exclude any prompts for data that have been supplied via options

Please ★ this repo if you found it useful ★ ★ ★

Features

  • Supports boolean data types
  • Supports string data types
  • ES6 compatible

Installation

npm install --save yo-option-or-prompt

Dependencies

Usage

import Generator from 'yeoman-generator';
import yoOptionOrPrompt from 'yo-option-or-prompt';
 
class extends Generator {
  initializing() {
    this.optionOrPrompt = yoOptionOrPrompt;
  }
 
  async prompting() {
    this.context = await this.optionOrPrompt([
      {
        type: 'input',
        name: 'name',
        message: 'Project Name:',
        default: 'some-project'
      }
    ]);
  }
}

Support

Submit an issue

Contributing

Review the guidelines for contributing

License

MIT License

Jam Risser © 2018

Changelog

Review the changelog

Credits

Support on Beerpay (actually, I drink coffee)

A ridiculous amount of coffee ☕️ ☕️ ☕️ was consumed in the process of building this project.

Add some fuel if you'd like to keep me going!

Beerpay Beerpay

Readme

Keywords

none

Package Sidebar

Install

npm i yo-option-or-prompt

Weekly Downloads

0

Version

0.2.0

License

MIT

Unpacked Size

7.92 kB

Total Files

5

Last publish

Collaborators

  • codejamninja