-
-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: How to pass additional arguments to npm task via Gradle command line? #262
Comments
IvanPizhenko
changed the title
Question: How to pass additional arguments to node task via gradle command line?
Question: How to pass additional arguments to npm task via Gradle command line?
Feb 21, 2023
Do you need these to be generic or is there a different set of them? tasks.register('myNpmTask', NpmTask) {
args = ['run', 'task', 'args']
inputs.dir('src') // Remember to declare inputs and outputs
outputs.dir('dist')
} Otherwise if you need it to be dynamic you can either subclass But this project supplying a generalized |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Assume in my
package.json
I have a task named "xxx".Using
npm
itself, I can run it as follows:npm run xxx
.I also can run it with additional arguments in the following way:
npm run xxx -- more arguments for xxx
.When I run this task using node plugin for Gradle, I can run it using
./gradlew npm_run_xxx
.But is there a way to pass those additional arguments to the npm task, like I've done above with
npm
right on the Gradle command line?The text was updated successfully, but these errors were encountered: