Change browser that is used for "grunt auto-build"

Hi!

I am currently developing extensions for the bpmn-js-properties-panel. I use “grunt auto-build” to start the application from bpmn-js-examples/properties-panel. Everything works fine and the app is started and opened in my browser. However, I don’t want it to be opened in my default browser (Safari) but in Chrome which has much better developer tools. On the other hand I do not want to switch my default browser ATM. Is there any option to tell grunt that it shall open the app in Chrome?

Thx,
Robin

Hi Robin,

we’re using grunt-contrib-connect to serve the example, and its open-function which always starts the default browser. Unfortunately there is no way to configure that in the Gruntfile itself. Maybe there is a way to temporarily set the default browser in the command line, but this is out of the scope of bpmn-js…

Forget what I just said. I’ve just found out you do can configure it: Just change the following line:

from
open: true,
to
open: { appName: 'google-chrome' }

This should do the trick!

Great! That hint helped!
Since I am on Max OS, ‘google-chrome’ did not work (I guess that is the executable’s name with Linux). So I used this one instead:
open: { appName: '/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome' },

Thanks for your quick help!

Best Regards,
Robin

1 Like

I’m glad you could figure out how it works an MacOS :+1: