Please enable JavaScript.
Coggle requires JavaScript to display documents.
yeoman (用户互动 (打印 (只使用this.log()), 提示 (用this.prompt), 参数 (用this.argument())…
yeoman
用户互动
打印
只使用this.log()
提示
用this.prompt
参数
用this.argument()
选项
用this.option()
运行中间件的顺序
自动执行
不自动执行方法
运行的数量
单个生成器运行
多个生成器运行
执行顺序
队列排序
异步任务
promises
this.async()
安装依赖
可以直接用generator
通过编程方式管理npm依赖项
工作目录
this.destinationRoot();返回项目依赖地址
this.destinationPath('index.js');返回项目下index.js文件
合成功能
composeWith()合成生成器的功能,需要两个参数
require.resolve()
用require.resolve()合成的路径
options
保存用户配置
单元测试
debugging