【问题标题】:grunt-shell task for running php from cli not found找不到从 cli 运行 php 的 grunt-shell 任务
【发布时间】:2016-05-24 10:12:16
【问题描述】:

我从 咕噜声 开始。 我想从 CLI 执行几个 php 文件。

所以我已经安装了 grunt-shell npm install --save-dev grunt-shell

现在我有了这个 gruntfile:

module.exports = function(grunt) {

  grunt.initConfig({
    shell: {
      php: {
        multiple: {
          command:  [
            'php -f /home/leandro/oskar.php',
            'php -f /home/leandro/oskar2.php'
          ].join('&')
        }
      }
    }
  });


  grunt.registerTask('default', ['shell:php']);
};

我已经尝试了调用任务的所有组合,但输出总是:

Warning: Task "shell:php" not found. Use --force to continue. Aborted due to warnings.

【问题讨论】:

    标签: javascript php shell gruntjs gruntfile


    【解决方案1】:

    嗯,我从 Grunt 开始,似乎 node 的 package.json 是强制性的。 它适用于它! :)

    【讨论】:

      猜你喜欢
      • 2014-02-17
      • 1970-01-01
      • 2013-02-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-03-22
      相关资源
      最近更新 更多