标签:
在用Atom写项目,同时用到grunt做自动化,当然就想到在atom直接调用grunt,有一个现成的atom plugin叫grunt-runner,安装后,需要配置一下,而且对于mac最新的OS X 10.10还需要特别注意:
Find where grunt is in the Terminal:
$ which grunt
/usr/local/bin/grunt
Add /usr/local/bin to Grunt Paths in the grunt-runner settings.
If no path is returned after the which, you have to install Grunt globally through npm
Troubleshooting For Yosemite (OS X 10.10)
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:
Uncaught BufferedProcessError: Failed to spawn command grunt. Make sure grunt is installed and on your PATH
One workaround is to add the following line:
process.env.PATH = [“/usr/local/bin”, process.env.PATH].join(“:“)
To the file:
~/.atom/init.coffee
标签:
原文地址:http://my.oschina.net/fwj/blog/414732