Ich schaffte es, das zu erreichen, was ich mit parallel wollte Aufgaben, Copyfiles und npm Uhr:
npm dev Abhängigkeiten:
"npm-watch": "^0.1.8",
"parallelshell": "^2.0.0",
"copyfiles": "^1.2.0",
package.json snippet:
"watch": {
"copy-files": "dist/*.js"
},
"scripts": {
"ng": "ng",
"start": "ng serve",
"lint": "tslint \"src/**/*.ts\" --project src/tsconfig.json --type-check && tslint \"e2e/**/*.ts\" --project e2e/tsconfig.json --type-check",
"test": "ng test",
"pree2e": "webdriver-manager update --standalone false --gecko false",
"e2e": "protractor",
"watch": "npm-watch",
"copy-files": "copyfiles src/** dist/** ../angular",
"ng-build": "ng build -w",
"build": "parallelshell \"ng build\" \"npm run watch\" "
},
Dann
npm laufen build
FWIW die Uhr Config sagt, wenn etwas in dist/*. Js Änderungen, die "copy-files" npm Skript ausführen ...