🚀 Launch Week Day 2:Introducing Custom Tabs for Org Alerts.Learn More →
Socket
Book a DemoInstallSign in
Socket

assemble-ask

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

assemble-ask

Assemble plugin for asking questions and storing answers.

latest
Source
npmnpm
Version
0.1.4
Version published
Maintainers
1
Created
Source

assemble-ask NPM version

Assemble plugin for asking questions and storing answers.

Install

Install with npm

$ npm i assemble-ask --save

Usage

var assemble = require('assemble');
var ask = require('assemble-ask');

app = assemble();
app.use(ask());

app.ask('What is your name?', function(err, answer) {
  // answer => user's answer
});

Ask stored questions

app.question('name', 'What is your name?');
app.ask('name', function(err, answer) {
  // answer => user's answer
});

Automatically return saved answer

app.store.set('name', 'Jon');
app.ask('name', function(err, answer) {
  // answer => 'Jon'
});

Force re-asking a question

app.store.set('name', 'Jon');
app.ask('name', {force: true}, function(err, answer) {
  // answer => given answer
});

Helpers

Also adds an ask helper that can lookup stored questions and answers.

Example

The following will prompt the user once:

{{ask "What is your name"}}

If an answer is given by the user, it will be stored and automatically used until the user asks again on a new project or forces the question to be re-asked.

API

  • assemble: Static site generator for Grunt.js, Yeoman and Node.js. Used by Zurb Foundation, Zurb Ink, H5BP/Effeckt,… more | homepage
  • assemble-loader: Assemble plugin (0.6+) for loading globs of views onto custom view collections. Also works with… more | homepage
  • assemble-permalinks: Permalinks plugin for assemble. (0.6+) | homepage
  • assemble-streams: Assemble plugin that adds convenience methods for working with streams, like toStream, which pushes a… more | homepage

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Author

Jon Schlinkert

License

Copyright © 2015 Jon Schlinkert Released under the MIT license.

This file was generated by verb-cli on October 21, 2015.

FAQs

Package last updated on 21 Oct 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts