UNPKG

generator-simple-aspnet

Version:
53 lines (43 loc) 1.18 kB
'use strict'; var yeoman = require('yeoman-generator'); var chalk = require('chalk'); var yosay = require('yosay'); module.exports = yeoman.generators.Base.extend({ initializing: function() { this.pkg = require('../package.json'); }, prompting: function() { var done = this.async(); this.log('As the name implies, this is a VERY simple and opinionated aspnet5 yeoman generator.'); var prompts = [{ type: 'input', name: 'appName', message: 'What is your app name?', default: this.appname }]; this.prompt(prompts, function(props) { this.appName = props.appName; done(); }.bind(this)); }, writing: { app: function() { this.directory('src', 'src'); }, projectfiles: function() { this.fs.copy( this.templatePath('gitignore'), this.destinationPath('.gitignore') ); } }, install: function() { var npmdir = process.cwd() + '/src'; process.chdir(npmdir); this.installDependencies({ skipInstall: this.options['skip-install'], bower: false, npm: true }); } });