Giter VIP home page Giter VIP logo

yo-option-or-prompt's Introduction

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

yo-option-or-prompt's People

Contributors

clayrisser avatar lavanya881 avatar seantrane avatar

Watchers

 avatar  avatar

yo-option-or-prompt's Issues

ReferenceError: regeneratorRuntime is not defined

Had the following error when using this script (via generator-github-project):

events.js:167
      throw er; // Unhandled 'error' event
      ^

ReferenceError: regeneratorRuntime is not defined
    at /Users/.../node_modules/yo-option-or-prompt/lib/index.js:10:46
    at Object.<anonymous> (/Users/.../node_modules/yo-option-or-prompt/lib/index.js:70:2)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/Users/.../initializing.js:12:31)
Emitted 'error' event at:
    at Immediate.setImmediate (/Users/.../node_modules/yeoman-generator/lib/index.js:433:22)
    at runCallback (timers.js:693:18)
    at tryOnImmediate (timers.js:664:5)
    at processImmediate (timers.js:646:5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.