Open cmarchand opened 2 years ago
A few people have asked for this feature, but perhaps not many enough. What people usually do is npm run your-script
from Maven, and then in package.json add "your-script": "node something.js"
inside the scripts
block. You then get the additional benefit of being able to do npm run your-script
directly from the command line (without Maven) which can be convenient if your command is somewhat complex (node some/kind/of/script.js --foo bar ./bla --etc
).
Yes, that's a solution. In my situation, at this point, I do not have anymore need of npm, so adding a package.json
in my maven project is not very useful.
But yes, it's a good workaround. Thanks.
New Mojo to execute arbitrary node commands
As explained in issue #996 I need a new Mojo to run
node
command with arbitrary parametersTests and Documentation
README.md contains an example to use NodeMojo plugin.