Open mmumshad opened 8 years ago
I have the same issue - did you work it out?
The problem is with grunt-run. If you've got the gruntfile
module.exports = function(grunt)
{
grunt.initConfig({
run: {
ls: {
cmd: 'ls'
}
}
});
grunt.loadNpmTasks('grunt-run');
};
and run grunt run
you get the error message. If you run grunt run:ls
it works fine.
Looking at grunt-run's source code, it looks as if tasks are skipped if the keyword run
appears on the command line, unless the task is explicitly specified or the itterable
(note spelling) option is set to true
. I'm sure there's a really good reason for this, but I don't know what it might be.
So you would have to add itterable: true
to your options
for the run
config, or change run
to run:commands
.
I am trying to use osprey-mock-service to mock RAML service in my project. When I serve my application with grunt, I use grunt-run to execute the mock service before the application is shared like this:
I am trying to watch my api.raml file so if it is changed, the osprey-mock-service is re-run automatically like this:
When I change the file, I get the following error. What am I doing wrong? Is this a bad way to do this?