leandro713
leandro713

Reputation: 1408

grunt-shell task for running php from cli not found

I'm starting with grunt. I would like to execute several php files from CLI.

So i've installed grunt-shell with npm install --save-dev grunt-shell

Now i have this 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']);
};

I've tried all the combinations of calling the task but the output is always:

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

Upvotes: 1

Views: 198

Answers (1)

leandro713
leandro713

Reputation: 1408

well, i'm begining with Grunt and seems a package.json for node is mandatory. it works with it! :)

Upvotes: 0

Related Questions