atom-grunt-runner的配置

在用Atom写项目,同时用到grunt作自动化,固然就想到在atom直接调用grunt,有一个现成的atom plugin叫grunt-runner,安装后,须要配置一下,并且对于mac最新的OS X 10.10还须要特别注意:npm

Find where grunt is in the Terminal:grunt

$ which grunt /usr/local/bin/grunt Add /usr/local/bin to Grunt Paths in the grunt-runner settings.atom

If no path is returned after the which, you have to install Grunt globally through npmspa

Troubleshooting For Yosemite (OS X 10.10)it

If not launched from command-line Atom currently has a bug where it's unable to loads OS X's PATH due to a change in the way Yosemite functions.自动化

You may receive the following error:io

Uncaught BufferedProcessError: Failed to spawn command grunt. Make sure grunt is installed and on your PATHfunction

One workaround is to add the following line:配置

process.env.PATH = ["/usr/local/bin", process.env.PATH].join(":")file

To the file:

~/.atom/init.coffee

相关文章
相关标签/搜索