【问题标题】:Avoid conflicts in Yeoman generator避免 Yeoman 生成器中的冲突
【发布时间】:2014-06-30 14:32:11
【问题描述】:

在使用 Yeoman 搭建脚手架时,我想用模板替换我的应用程序中的部分内容。一切似乎都很好,但我在脚手架期间遇到了这个冲突错误。

this.template( 'conditional-files/html/_signup.email.html', 'app/html/partials/_main.signup.html' );

conflict app/html/partials/_main.signup.html [?] Overwrite app/html/partials/_main.signup.html? (Ynaxdh)

有没有办法避免这种情况?我考虑传递一个 {status: 'force'} 但这似乎不起作用。

【问题讨论】:

    标签: yeoman yeoman-generator


    【解决方案1】:

    我可以看到几个选项: 1. 您可以将 --force 作为选项传递给 yo 命令: yo mygenerator --force 2.可以在调用模板函数之前设置generator.conflicter.force = true

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-05-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-02-26
      相关资源
      最近更新 更多