Created
November 4, 2017 00:06
-
-
Save webmaxru/5ef2fbc1cb18ef38af4a1c84936261a8 to your computer and use it in GitHub Desktop.
Emulate Angular 1.6 NGSW build support
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| ... | |
| "scripts": { | |
| ... | |
| "ngsw-config": "node_modules/.bin/ngsw-config dist src/ngsw-config.json", | |
| "ngsw-copy": "cp node_modules/@angular/service-worker/ngsw-worker.js dist/", | |
| "build-prod-ngsw": "ng build --prod && npm run ngsw-config && npm run ngsw-copy", | |
| "serve-prod-ngsw": "npm run build-prod-ngsw && http-server dist -p 8080" | |
| } | |
| } |
@zuber-edvantics if you're using the cmd prompt on windows the proper command to copy a file it is 'copy' not the linux default 'cp', but if you want to use the 'cp' anyway you can use the command as it is on the powershell prompt.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this script "ngsw-copy": "cp node_modules/@angular/service-worker/ngsw-worker.js dist/", has raised
'cp' is not recognized as an internal or external command,
operable program or batch file.
in window cmd prompt. Please help.