gpt4 book ai didi

javascript - 使用任意 gulpfile 名称运行 gulp(不是 gulpfile.js)

转载 作者:IT老高 更新时间:2023-10-28 12:45:39 24 4
gpt4 key购买 nike

我的 gulpfile 中有一个特定任务与其他任务隔离,并且永远不需要作为其余构建过程的一部分运行。我想把它放在一个单独的 gulpfile 中并自行执行。

如何将 gulp 与具有自定义名称的 gulpfile 一起使用?

Getting started document冒充 Gulp 的文档似乎没有提到 CLI。我对 gulp 参数的搜索尝试,主要是关于如何将命令行参数放入 gulp 任务的结果。

实际用例是在 Docker 容器中提取可翻译的字符串,我不想让不必要的 node.js 包膨胀。

最佳答案

这里是gulp CLI docs说:

--gulpfile <gulpfile path> will manually set path of gulpfile. Useful if you have multiple gulpfiles. This will set the CWD to the gulpfile directory as well

关于javascript - 使用任意 gulpfile 名称运行 gulp(不是 gulpfile.js),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34099103/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com