简体   繁体   中英

Gulp browserSync Firefox Ubuntu 16.04

How do we define the browser for gulp browserSync. I am on ubuntu 16.04, I have chrome, firefox and firefox developer edition installed on my machine and I want gulp browserSync to open firefox developer edition. How can I do that? Here is my configuration :

function startBrowserSync() {
    options = {
        browser: 'FirefoxDeveloperEdition',
        proxy: 'localhost:' + port,
        port: 3000,
        files: [],
        ghostMode: {
            clicks: true,
            location: false,
            forms: true,
            scroll: true
        },
        injectChanges: true,
        logFileChanges: true,
        logLevel: 'debug',
        logPrefix: 'gulp-patterns',
        notify: true,
        reloadDelay: 0 
    };
    browserSync(options);

I just achieved it with the option :

browser: "firefox_dev"

But it might depends of how you installed firefox developer edition on your system, and how this one runs firefox developer edition.

For more precision, if I type 'firefox_dev' in the commande line, a new firefox developer edition opens.

I got this working by typing firefox, then hitting tab on the command line. It auto completed to firefox-developer. So add this line and it should work fine.

browser: 'firefox-developer',

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM