lib/template.js
function runPrompts (opts) {
  if (opts.questionnaire && this.init.configure) {
    this.sprout.emit('msg', 'running questionnaire function')
    const unansweredConfig = lodash.filter(this.init.configure, (q) => {
      return !lodash.includes(lodash.keys(this.config), q.name)
    })
    return opts.questionnaire(unansweredConfig)
      .then((answers) => { return lodash.assign(this.config, answers) })
  }
}
function runPrompts (opts) {
  if (opts.questionnaire && this.init.configure) {
    this.sprout.emit('msg', 'running questionnaire function')
    const unansweredConfig = lodash.filter(this.init.configure, (q) => {
      return !lodash.includes(lodash.keys(this.config), q.name)
    })
    return opts.questionnaire(unansweredConfig)
      .then((answers) => { return lodash.assign(this.config, answers) })
  }
}
function runPrompts ( opts ) { if ( opts . questionnaire && this . init . configure ) { this . sprout . emit ( 'msg' , 'running questionnaire function' ) const unansweredConfig = lodash . filter ( this . init . configure , ( q ) => { return ! lodash . includes ( lodash . keys ( this . config ) , q . name ) } ) return opts . questionnaire ( unansweredConfig ) . then ( ( answers ) => { return lodash . assign ( this . config , answers ) } ) } }
If questionnaire function exists, run it to get answers. Omitting keys already set in config return answers merged with config values.
If questionnaire function exists run it to get answers . Omitting keys already set in config return answers merged with config values .