找不到从 CLI 运行 PHP 的 grunt-shell 任务


grunt-shell task for running php from cli not found

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

所以我安装了咕噜咕噜的外壳 npm install --save-dev grunt-shell

现在我有这个咕噜咕噜的文件:

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.

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