Open jetownsend opened 7 years ago
I second that, it could look like
<execution>
<phase>generate-resources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>ng</executable>
<arguments>test</arguments>
</configuration>
</execution>
this will remove need to add specific goals (which will never work in all cases), and everything can be executed thru this.
Current workaround is to add your needed script to package.json, e.g.:
"scripts": {
"ng": "ng"
}
and then use run
command of the npm, with "new" script argument separator --
, like this:
<execution>
<id>test</id>
<phase>test</phase>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>run ng test -- --single-run</arguments>
</configuration>
</execution>
There should be an easy way to execute a node CLI command (e.g. to run a make script for a dependency) with the installed NodeJS application. We have run executions for npm, Grunt, gulp, webpack, etc. but I don't see one for node, except possibly to use one of the others to exec a node command with a shell.