This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.fs.copyTpl( | |
this.templatePath('index.html'), | |
this.destinationPath('public/index.html'), | |
{ title: 'Templating with Yeoman' } | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// generator from another package | |
this.composeWith('backbone:route', { | |
options: options | |
}, { | |
local: require.resolve('generator-bootstrap') | |
}); | |
// local subgenerator | |
this.composeWith('mygenerator:git', { | |
options: options |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prompting: function () { | |
// Have Yeoman greet the user. | |
// Would love to skip this if this generator is called from another generator. | |
this.log(yosay( | |
'Welcome to the <%- superb %> ' + chalk.red('<%= generatorName %>') + ' generator!' | |
)); | |
var prompts = [{ | |
type: 'confirm', | |
name: 'someAnswer', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ye = require('yeoman-easily'); | |
var Easily = ye.Easily; | |
var commonPrompts = ye.prompts; | |
var chalk = require('chalk'); | |
module.exports = Easily.createGenerator({ | |
prompting: function () { | |
return this.easily | |
.greet('Welcome to the awesome generator!') | |
.confirmBeforeStart('Would you like to use bower?') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: gpl-3.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: gpl-3.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: gpl-3.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: gpl-3.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: gpl-3.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: gpl-3.0 |