dthree / dthree/vorpal

Mutliple prompts called from different files

Open
#138 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5.6k
Forks
278
PR merge metrics
No merged PRs in 30d

Description

So am working with multiple prompts called from different files like this :
`vorpal`
`.command('init')`
`.description ('Create the configuration file for the project.')`
`.action(function(args, cb){`
`const self = this;`
`cordovaTasker.createConfig;`
`})`

The function `createConfig` simply provides a prompt like this :

`var formulaire = [{...},{...}];`

`vorpal`
`.command('bake [type]')`
`.description ('Generation Cordova.')`
`.autocomplete(['corn', 'steak', 'pasta'])`
`.option('-ng, --angular', 'Generate a cordova project with AngularJS architecture')`
`.action(function(args, cb){`
`const self = this;`
`this.prompt(formulaire, function(answers){`
`displayModule.infoOut('Test affichage');`
`console.log('\n Review _______________________ ');`
`console.log(JSON.stringify(answers, null, ' '));`
`});`
`})`
`.cancel(function () {`
`this.log('Didn\'t mother teach you to be patient?');`
`})`
`.show();`
`};`

Is it possible to have prompts called out like this ? #

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.