自定义消息在Yeoman结束时生成

一切完成后,我想向用户显示自定义消息。 我试图写一个end函数,但没有被调用。

我在Yeoman回购中曾经问过这个问题 ,但他们说这更适合于SO。

谢谢

你有没有尝试过这样的事情?

记得在显示消息时使用this.log,在文档中如何使用priority

 module.exports = yeoman.generators.Base.extend({ initializing: function() { this.fs.copy( this.templatePath('blah.js'), this.destinationPath('blah.js') ); }, end: function() { this.log("All Done!"); }, });