Good day to all! I make a web application on Angular 2. I wanted to automate deploy by ftp. To build using Webpack. There is information that node.js itself can help in solving the problem, there is an example script. But how to make the necessary script run after executing the npm run build command? As I understand it, you need to add a script call to the scripts section of the package.json file. Or am I wrong? The scripts section of the package.json file.
"scripts": { "clean": "rimraf node_modules doc dist && npm cache clean", "clean-install": "npm run clean && npm install", "clean-start": "npm run clean-install && npm start", "watch": "webpack --watch --progress --profile", "build": "rimraf dist && webpack --progress --profile --bail", "server": "webpack-dev-server --inline --progress --port 8080", "webdriver-update": "webdriver-manager update", "webdriver-start": "webdriver-manager start", "lint": "tslint --force \"src/**/*.ts\"", "e2e": "protractor", "e2e-live": "protractor --elementExplorer", "pretest": "npm run lint", "test": "karma start", "posttest": "remap-istanbul -i coverage/json/coverage-final.json -o coverage/html -t html", "test-watch": "karma start --no-single-run --auto-watch", "ci": "npm run e2e && npm run test", "docs": "typedoc --options typedoc.json src/app/app.component.ts", "start": "npm run server", "start:hmr": "npm run server -- --hot", "postinstall": "npm run webdriver-update", }, Thanks for the help.