UNPKG

generator-angular2-with-router

Version:

A simple angular2 application having 3 pages with angular2 in build router to navigate between pages. It have all basic functionality which a standard angualr2 application needed.

37 lines (31 loc) 881 B
'use strict'; var yeoman = require('yeoman-generator'); var chalk = require('chalk'); var yosay = require('yosay'); module.exports = yeoman.Base.extend({ prompting: function () { // Have Yeoman greet the user. this.log(yosay( 'Welcome to the wonderful ' + chalk.red('generator-angular2-with-router') + ' generator!' )); var prompts = [{ type: 'confirm', name: 'someAnswer', message: 'Would you like to enable this option?', default: true }]; return this.prompt(prompts).then(function (props) { // To access props later use this.props.someAnswer; this.props = props; }.bind(this)); }, writing: function () { this.fs.copy( this.templatePath('.'), this.destinationPath('.') ); }, install: function () { this.installDependencies(); } });