Plugin for question-store that adds a
matchmethod for filtering out questions to ask using glob patterns or regex.
Install with npm:
$ npm i question-match --save
Also see question-force.
var match = require('question-match');
var Questions = require('question-store');
var questions = new Questions();
// register the plugin
questions.use(match());
// pre-load answer data from package.json and
// set some questions to ask
questions.setData(require('../package'));
.set('author.name', 'Author name?')
.set('author.username', 'Author username?')
.set('author.url', 'Author url?')
.set('project.name', 'What is the project name?')
.set('project.desc', 'What is the project description?');
// only ask questions with keys that match `*.name`
questions.match('*.name')
.ask(function(err, answer) {
console.log(answer)
});
You might also be interested in these projects:
Install dev dependencies:
$ npm i -d && npm test
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Jon Schlinkert
Copyright © 2016 Jon Schlinkert Released under the MIT license.
This file was generated by verb on January 28, 2016.