prompt-base
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "prompt-base", | ||
"description": "Base prompt module used for creating custom prompts.", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"homepage": "https://github.com/enquirer/prompt-base", | ||
@@ -6,0 +6,0 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)", |
@@ -13,2 +13,6 @@ # prompt-base [![NPM version](https://img.shields.io/npm/v/prompt-base.svg?style=flat)](https://www.npmjs.com/package/prompt-base) [![NPM monthly downloads](https://img.shields.io/npm/dm/prompt-base.svg?style=flat)](https://npmjs.org/package/prompt-base) [![NPM total downloads](https://img.shields.io/npm/dt/prompt-base.svg?style=flat)](https://npmjs.org/package/prompt-base) [![Linux Build Status](https://img.shields.io/travis/enquirer/prompt-base.svg?style=flat&label=Travis)](https://travis-ci.org/enquirer/prompt-base) [![Windows Build Status](https://img.shields.io/appveyor/ci/enquirer/prompt-base.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/enquirer/prompt-base) | ||
* no message (uses `${name}?` as message) | ||
* options.default (string, array) | ||
* options.when | ||
## Release history | ||
@@ -20,8 +24,4 @@ | ||
prompt-base is a node.js library for creating command line prompts. You can use prompt-base directly for [simple input prompts](#simple input prompts), or as a "base" for creating [custom prompts](#custom prompts) that | ||
prompt-base is a node.js library for creating command line prompts. You can use prompt-base directly for simple input prompts, or as a "base" for creating [custom prompts](#in-the-wild): | ||
```js | ||
var prompt = require('prompt-base')('What is your favorite color?'); | ||
``` | ||
## Usage | ||
@@ -52,2 +52,13 @@ | ||
You can also pass a string directly to the main export: | ||
```js | ||
var prompt = require('prompt-base')('What is your favorite color?'); | ||
prompt.run() | ||
.then(function(answer) { | ||
console.log(answer); | ||
}) | ||
``` | ||
## Custom prompts | ||
@@ -472,3 +483,3 @@ | ||
| --- | --- | | ||
| 83 | [jonschlinkert](https://github.com/jonschlinkert) | | ||
| 93 | [jonschlinkert](https://github.com/jonschlinkert) | | ||
| 6 | [doowb](https://github.com/doowb) | | ||
@@ -475,0 +486,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39340
515