Visual Studio 2013 provides Task Runner Explorer for us to run Grunt & Gulp task right inside of Visual Studio.
One can download Task Runner Explorer from Visual Studio Gallery
Once installed we can now use npm to install grunt for us in our node web project.
npm install grunt --save-dev
//the command above will install into our package.json file
"devDependencies": {
"grunt": "^0.4.5"
}
We now will create a new Gruntfile.js and also launch our task runner explorer (View > Other Windows > Task Runner Explorer), as you can see we don’t have any task yet so there is no task to run.
We will now add our hello world task
module.exports = function(grunt) {
grunt.registerTask('default', function () {
grunt.log.writeln("Hello world grunt");
});
}
From there we will need to click on the reload button on task runner and it will now contain our default task.
Lets try to run the default task and see how it looks like
In my next blog post I will show how we will use Grunt to concat (join) some files together and continue on our journey with Task Runner Explorer in Visual Studio 2013.
View Comments (2)
I am having trouble with running my project using the task runner.
I keep getting this error ">> Error: spawn cmd.exe ENOENT"
everything is setup so nicely and the project runs on different machines besides mine.
I have checked the path and its ok i am not missing anything in my system variables
any thought
Try this post from github https://github.com/facebook/create-react-app/issues/7251
and stackoverflow https://stackoverflow.com/questions/52170312/spawn-cmd-exe-enoent-error-on-running-react-native-project