10

How to modify/extend a new Angular CLI 1.6 (and later) project so after running ng build --prod we also generate a ZIP archive of the production website?

I want it to be an integral part of the CLI build process, if possible, and not a custom external solution (which I'm currently using).

vitaly-t
  • 24,279
  • 15
  • 116
  • 138
  • You can add a command to `package.json` called `postbuild`, and npm will run it automatically after `build` - but that is so well known that you must have something else in mind. Would you please add a note as to why not postbuild, and why? –  Sep 10 '18 at 07:10

1 Answers1

1

I have tried using java cmd and it working:

let run:

jar -cMf target.zip dist

or:

jar -cMf target.zip *

read more in here: Java creating .jar file

Community
  • 1
  • 1