apache / cordova-serve

Apache Cordova Serve Library
https://cordova.apache.org/
Apache License 2.0
21 stars 31 forks source link

forward the CLI user arguments to cordova-serve/browser #18

Open Max104t opened 5 years ago

Max104t commented 5 years ago

Feature Request

Motivation Behind Feature

I'm trying to pass --allow-file-access-from-files --disable-web-security to chromium, and it seems that cordova-serve/src/browser and callers are dropping the command line arguments.

Where should I forward this feature request? Thanks!

Feature Description

Forward the CLI user arguments to cordova-serve/src/browser from cordova-browser:

return server.launchBrowser({
    target: args.target,
    url: projectUrl,
    userArgs: args.remain
});

Then pass these arguments to the browser during launch in cordova-serve/src/browser

module.exports = function (opts) {
    var userArgs = opts.userArgs || '';
     /* ... */

function getBrowser (target, dataDir, userArgs) {
    /* ... */
}

Alternatives or Workarounds

Launch chrome manually and let the default instance handle local host launching

brunobertechini commented 4 years ago

Is this implemented already ?

Max104t commented 4 years ago

yes, I can send a merge request!

NiklasMerz commented 3 years ago

@Max104t This looks like a good change. It would be nice if you could submit a pull request with your commit as it looks well done.

Max104t commented 3 years ago

My account is locked.. please feel free to fork and merge my branch..

timbru31 commented 3 years ago

I've gone ahead and created #42 while retaining your original commit.