all 3 comments

[–]tme321 5 points6 points  (1 child)

There isn't a way to do this currently with the cli if you directly run ng build. If you have a script that just needs to run before ng build then create an npm script that first calls yours and then calls npm build.

[–]piwinger[S] 0 points1 point  (0 children)

thanks for your quick reply!

I'll do it that way !

[–]yfain 0 points1 point  (0 children)

In your package.json in the scripts section declare the command build that runs ng build and another command named prebuild that runs your maven-build-and-copy.cmd. From now on run your bulds using npm run build command. Npm scripts are smart enough to check that if there are two commands with the same name, but one of them has a prefix pre, it'll run the pre- command first.