有没有办法告诉grunt要使用哪个grunt.js文件?如何从不同于我的根项目的文件夹运行grunt
我有一个包含grunt.cmd, node.exe,...
,与GruntFile.js
我实际的Web应用程序和f:\a\b\tools
文件夹中所有本地node_modules
是f:\a\c\my_app
从a\c\my_app
运行繁重的工作正常,但试图从一些其他的文件夹中运行咕噜说了呢似乎没有工作。我是新来的咕噜声,可能是我缺少明显的东西。
f:\a>grunt --config c\GruntFile.js
grunt-cli: The grunt command line interface. (v0.1.6)
Fatal error: Unable to find local grunt.
If you're seeing this message, either a Gruntfile wasn't found or grunt hasn't been installed locally to your project. For more information about installing and configuring grunt, please see the Getting Started guide:
http://gruntjs.com/getting-started
FWIW,使用'--base'不适用于我,但是使用'--gruntfile'。 – 2014-08-29 19:17:09
这怎么可以设置为'默认'?我们有一个Generic Grunt文件,可以在我们的所有应用程序中使用,所以我们希望它在一个文件夹(子模块)中,但仍然只是想通过调用grunt来运行所有内容,而不是每次都输入--gruntfile。 – WORMSS 2014-12-15 09:13:26
这似乎不适用于手表文件。初始运行是可以的,但是当手表触发一次运行时,路径会出现双倍错误:'无法找到gruntfile“c \ my_app \ c \ my_app \ gruntfile.js”' – NDM 2015-12-10 19:30:28