atom-grunt-runner的配置

2015/05/14 12:20
阅读数 195

在用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

展开阅读全文
打赏
0
1 收藏
分享
加载中
更多评论
打赏
0 评论
1 收藏
0
分享
返回顶部
顶部