Sublime Text 2 build with Grunt v0.4.0
我正在尝试设置崇高的构建过程来运行grunt(v0.4)这是我的构建片段:
1 2 3 4 5 6 7 8 9 | { "cmd": ["grunt","--no-color"], "selector": ["Gruntfile.js"], "path":"/usr/local/bin", "working_dir":"${project_path}", "osx": { "cmd": ["grunt","--no-color"] } } |
当我点击commandakbd b时,我得到以下错误:
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
[Finished in 0.2s with exit code 99]
当我从终端运行
有什么想法吗?
这是一个"错误"的崇高的文本。当您点击
因此,为了成功构建,您需要将您的gruntfile放在文件夹中作为工作目录,然后以崇高的文本打开文件夹并点击
从命令行输入
在运行gruntjs之前,您需要安装它:npm安装grunt--保存dev在新版本的gruntjs中,"grunt"不是全局安装的,因此在每个项目中都可以使用不同版本的gruntjs。