GruntJs'grunt'cmd打开Visual Studio? [英] GruntJs 'grunt' cmd opens Visual Studio?
问题描述
我已经能够在零个问题的几个个人项目上使用 GruntJs 。我决定在工作中使用它。
我运行: grunt init:gruntfile
并且创建了gruntfile和package.json文件。
问题是,每当我运行任何grunt cmd grunt
或 grunt lint code>等它立即打开Visual Studio并打开gruntfile。实际上没有发生。
我做错了吗?
我没有阅读常见问题解答... HREF = https://github.com/gruntjs/grunt/wiki/Frequently-Asked-Questions> https://github.com/gruntjs/grunt/wiki/Frequently-Asked-Questions
如果与grunt.js grunt文件位于同一目录中,Windows会尝试在输入grunt时执行该文件。因此,您需要输入grunt.cmd来代替。
另一种方法是使用DOSKEY命令按照这些说明创建一个grunt宏。这将允许你使用grunt而不是grunt.cmd。这是您使用的DOSKEY命令:
编辑
您也可以使用 DOSKEY
命令:
DOSKEY grunt = grunt.cmd $ *
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 $*
这篇关于GruntJs'grunt'cmd打开Visual Studio?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!