# yeoman-prompting-helpers

> share prompting answers with other generators

Latest version **1.2.7** (published 2016-10-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install yeoman-prompting-helpers
pnpm add yeoman-prompting-helpers
yarn add yeoman-prompting-helpers
bun add yeoman-prompting-helpers
```

## Health

**Score 5/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: insecure dependencies; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.7 |
| Published | 2016-10-04 |
| First published | 2016-10-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | dan entous |
| Maintainers | dentous |
| Keywords | helpers, yeoman, yeoman helpers, yeoman prompting |

## Links

- npm: https://www.npmjs.com/package/yeoman-prompting-helpers
- Repository: https://github.com/dan-nl/yeoman-prompting-helpers
- Homepage: https://github.com/dan-nl/yeoman-prompting-helpers#readme
- Issues: https://github.com/dan-nl/yeoman-prompting-helpers/issues
- npm.io page: https://npm.io/package/yeoman-prompting-helpers

## Dependencies (4)

- [eslint](https://npm.io/package/eslint.md) 3.6.1
- [lodash.filter](https://npm.io/package/lodash.filter.md) 4.6.0
- [lodash.foreach](https://npm.io/package/lodash.foreach.md) 4.5.0
- [eslint-config-dan-nl](https://npm.io/package/eslint-config-dan-nl.md) git://github.com/dan-nl/eslint-config-dan-nl.git

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 1.2.7 (latest) — 2016-10-04
- 1.2.5 — 2016-10-04
- 1.2.4 — 2016-10-03
- 1.2.2 — 2016-10-02
- 1.2.1 — 2016-10-01
- 1.0.1 — 2016-10-01

## README

# yeoman-prompting-helpers
[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Dependency Status][david-dm-image]][david-dm-url] [![Dev Dependency Status][david-dm-dev-image]][david-dm-dev-url] [![NSP Status][nsp-image]][nsp-url]

share prompting answers with other generators

## table of contents
* [installation](#installation)
* [use](#use)
    * [initializing](#initializing)
    * [prompting](#prompting)
    * [using prompt answers](#using-prompt-answers)
* [example project](#example-project)
* [license](#license)

## installation
within the generator project directory
```javascript
npm install yeoman-prompting-helpers
```

## use
### initializing
in the generator’s initializing method
```javascript
var PromptAnswers = require( 'yeoman-prompting-helpers' ).PromptAnswers;

this.options.PromptAnswers = this.options.PromptAnswers || new PromptAnswers();

this.composeWith(
  'your-generator',
  { options: { PromptAnswers: this.options.PromptAnswers } },
  { local: require.resolve( 'generator-your-generator' ) }
);
```

### prompting
in the generator’s prompting method use the promptingHelper
```javascript
var promptingHelper = require( 'yeoman-prompting-helpers' ).promptingHelper;

/**
 * @returns {Array}
 */
function getGeneratorPrompts() {
  return [
    // your generator’s prompts
  ];
}

return promptingHelper( this, getGeneratorPrompts() );
```

### using prompt answers
anywhere the generator needs to retrieve a prompt answer
```javascript
this.options.PromptAnswers.get( prompt.name )
```

## example project
[generator-node-module][generator-node-module-url] illustrates how to initially setup the helpers and [generator-license][generator-license-url] shows how to use the shared prompt answers 

## license
[MIT License][mit-license]

[coveralls-image]: https://coveralls.io/repos/github/dan-nl/yeoman-prompting-helpers/badge.svg?branch=master
[coveralls-url]: https://coveralls.io/github/dan-nl/yeoman-prompting-helpers?branch=master
[david-dm-image]: https://david-dm.org/dan-nl/yeoman-prompting-helpers.svg
[david-dm-url]: https://david-dm.org/dan-nl/yeoman-prompting-helpers
[david-dm-dev-image]: https://david-dm.org/dan-nl/yeoman-prompting-helpers/dev-status.svg
[david-dm-dev-url]: https://david-dm.org/dan-nl/yeoman-prompting-helpers?type=dev
[generator-license-url]: https://github.com/dan-nl/generator-license/blob/master/app/writing.js#L17
[generator-node-module-url]: https://github.com/dan-nl/generator-node-module/blob/master/app/initializing.js#L8
[mit-license]: https://raw.githubusercontent.com/dan-nl/yeoman-prompting-helpers/master/license.txt
[npm-image]: https://img.shields.io/npm/v/yeoman-prompting-helpers.svg
[npm-url]: https://www.npmjs.com/package/yeoman-prompting-helpers
[nsp-image]: https://nodesecurity.io/orgs/githubdan-nl/projects/49dfe596-0412-419d-8aaa-764e46cd9d7b/badge
[nsp-url]: https://nodesecurity.io/orgs/githubdan-nl/projects/49dfe596-0412-419d-8aaa-764e46cd9d7b
[travis-image]: https://travis-ci.org/dan-nl/yeoman-prompting-helpers.svg?branch=master
[travis-url]: https://travis-ci.org/dan-nl/yeoman-prompting-helpers

---
_Source: https://npm.io/package/yeoman-prompting-helpers · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
