0.2.0 • Published 6 years ago

yo-option-or-prompt v0.2.0

Weekly downloads
12
License
MIT
Repository
github
Last release
6 years ago

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 :coffee: :coffee: :coffee: was consumed in the process of building this project.

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

Beerpay Beerpay