使用Grunt Connect和Grunt Open将Chrome设置为默认浏览器 [英] Set Chrome as default browser using Grunt Connect and Grunt Open
问题描述
我在我的OS X上使用Safari作为默认浏览器,但我希望使用Chrome作为Grunt连接和手表的默认设置,所以我按照我在 blog 。如果我在grunt打开选项中将'Google Chrome Canary'或'Firefox'设置为'app'参数,但是如果我尝试在Chrome的Parallel版Windows上使用Chrome浏览器上的虚拟化应用程序,则一切正常!我该怎么说才能在Parallels上使用谷歌浏览器,而不是在我的Mac OS X上使用?
使用此代码第31行:
opener ='open -a''+ escape(appName)+''';
尝试使用您想用作grunt任务应用参数的chrome的完整路径。您可以通过输入打开-a / some / path / to / chrome
来在终端上播放它,因此您不必运行整个咕噜任务。 p>
I use Safari as default browser on my OS X but I want use Chrome as default for Grunt connect and watch so i follow the steps i found on this blog. Everything ok if i set 'Google Chrome Canary' or 'Firefox' as 'app' parameter in grunt open options but if i try to use 'Google Chrome' a virtualized app on Chrome starting on Parallel's Windows version! How can I say to grunt to use not Google Chrome on Parallels but on my Mac OS X?
Looking at open's source on line 31 it opens using this code:
opener = 'open -a "' + escape(appName) + '"';
Try using the full path to the chrome you want to use as the app parameter for the grunt task. You can play around with it from the terminal by entering in open -a /some/path/to/chrome
so you do not have to run the whole grunt task.
这篇关于使用Grunt Connect和Grunt Open将Chrome设置为默认浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!