srs / gradle-node-plugin

Gradle plugin for integrating NodeJS in your build. :rocket:
Apache License 2.0
866 stars 211 forks source link

Unable to pass multiple argument in npm script #303

Open abhishek153 opened 6 years ago

abhishek153 commented 6 years ago

I have npm run task defined in package.json script as below

"e2e-remoteServer": "protractor ./protractor.conf.js",

using it in my gradle task as:

task npmRunTest(type: NpmTask) { args = ['run','e2e-remote'] }

I want to pass multiple arguments to run task : --baseUrl="http://localhost:8080/, --browser="firebox"

How can i achieve this using this plugin. I tried multiple option as args = ['run','e2e-remote', ''arg1, 'arg2'] but it seems to simply ignoring the other args. I am unable to run npm scripts similar to above.

Please help how I can achieve this?

Thanks, Abhishek

david-hm commented 5 years ago

Did you try args=['run', 'e2e-remote', '--baseUrl="http://localhost:8080/', '--browser="firebox"']?

thSoft commented 3 years ago

Maybe try args=['run', 'e2e-remote', '--', '--baseUrl="http://localhost:8080/', '--browser="firebox"'] (note the --)

deepy commented 3 years ago

I don't think this is an issue with the plugin, it seems to be specific for npm. The plugin just sends the arguments, if npm ignores them it won't matter what you send