Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- inquirer.prompt([{
- name : 'wantfeature',
- type : 'list',
- message : 'Do you want additional features?',
- choices : ['Yes', 'No']
- }])
- .then((choice) => {
- if(choice.wantfeature == 'Yes'){
- inquirer.prompt([{
- name : 'feature',
- type: 'list',
- message: 'Please select additional feature',
- choices : ['Linter','Prettier']
- }])
- .then((choice) => {
- if(choice.feature == 'Linter'){
- shell.cd(`${projectName}`);
- shell.exec('pwd');
- shell.exec('npm install eslint')
- }
- if(choice.feature == 'Prettier'){
- shell.cd(`${projectName}`);
- shell.exec('npm install --global prettier')
- }
- })
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement