UNPKG

generator-zionapps

Version:

Angular 9 Code Generator

35 lines (32 loc) 789 B
'use strict'; const Generator = require('yeoman-generator'); module.exports = class extends Generator { prompting() { const prompts = [ { type: 'list', name: 'action', message: 'What Ionic generator do you want to run?', choices: [ { name: 'Form', value: 'form' }, { name: 'List View', value: 'list-view' }, { name: 'Quit', value: 'quit' } ] } ]; return this.prompt(prompts).then(props => { if (props.action !== 'quit') { this.composeWith(require.resolve('./' + props.action), { props: { ...this.props, ...props } }); } }); } };