【问题标题】:How to use two gruntfiles for the same project/folder?如何为同一个项目/文件夹使用两个 gruntfiles?
【发布时间】:2013-07-24 11:41:42
【问题描述】:

我觉得我的处境很特殊。

我正在基于相同的源构建一个网站和一个移动网络应用程序(有一些期望,例如 index.html)

但这就是为什么我需要两个 Gruntfile 来分别为每个项目(站点和应用程序)配置构建任务。

如何处理两个 gruntfile?

PS:我尝试使用“grunt targets”,但插件如 e.g. useminPrepare 还不支持目标。

【问题讨论】:

标签: gruntjs


【解决方案1】:

使用--gruntfile 选项。比如grunt --gruntfile Gruntfile1.jsgrunt --gruntfile Gruntfile2.js

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-11-17
    • 1970-01-01
    • 2021-04-16
    相关资源
    最近更新 更多