I have been able to use GruntJs on several personal projects with zero problems. I decided I would use it on my project at work.
I run: grunt init:gruntfile
and that creates the gruntfile and the package.json file just fine.
The problem is that whenever I run any grunt cmd grunt
or grunt lint
etc it immediately opens up Visual Studio and opens the gruntfile. Nothing actually happens.
Any idea what I am doing wrong?
I didnt read the FAQ...
https://github.com/gruntjs/grunt/wiki/Frequently-Asked-Questions
If you're in the same directory as the grunt.js gruntfile, Windows tries to execute that file when you type grunt. So you need to type grunt.cmd instead.
An alternative would be to use the DOSKEY command to create a grunt macro, following these directions. That would allow you to use grunt instead of grunt.cmd. This is the DOSKEY command you'd use:
EDIT
Alternatively you could use the DOSKEY
command:
DOSKEY grunt=grunt.cmd $*
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With