Advertisement
Guest User

Untitled

a guest
Apr 18th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. inquirer.prompt([{
  2. name : 'wantfeature',
  3. type : 'list',
  4. message : 'Do you want additional features?',
  5. choices : ['Yes', 'No']
  6. }])
  7. .then((choice) => {
  8. if(choice.wantfeature == 'Yes'){
  9. inquirer.prompt([{
  10. name : 'feature',
  11. type: 'list',
  12. message: 'Please select additional feature',
  13. choices : ['Linter','Prettier']
  14. }])
  15. .then((choice) => {
  16. if(choice.feature == 'Linter'){
  17. shell.cd(`${projectName}`);
  18. shell.exec('pwd');
  19. shell.exec('npm install eslint')
  20. }
  21. if(choice.feature == 'Prettier'){
  22. shell.cd(`${projectName}`);
  23. shell.exec('npm install --global prettier')
  24. }
  25. })
  26. }
  27. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement