【问题标题】:Gulp - require gulpfile from node.js and pass task dataGulp - 需要来自 node.js 的 gulpfile 并传递任务数据
【发布时间】:2016-10-19 13:28:11
【问题描述】:

我正在尝试从另一个 node.js 文件运行 gulpfile

const gulp = require('gulp');
require('coffee-script/register');
require('../gulpfile');

并像这样执行它:

node ./bin/runGulp.js serve --foo bar

很遗憾,它没有启动此任务。

【问题讨论】:

    标签: javascript node.js coffeescript gulp gulp-watch


    【解决方案1】:

    您应该使用gulp 命令而不是node 运行gulp。

    试试

    gulp --gulpfile bin/rungGulp.js server --foo bar
    

    更多:Github issuegulp cli docs

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-04-16
      • 1970-01-01
      • 1970-01-01
      • 2015-10-18
      • 2023-04-09
      • 2019-03-10
      相关资源
      最近更新 更多