的package.json
{
"name": "cfch",
"version": "0.0.0",
"main": "gulpfile.js",
"scripts": {
"ng": "ng",
"start": "gulp && ng serve --proxy-config proxy.conf.json", //it's working
"build": "gulp && ng build --prod–aot && tar -zcvf archive.tar.gz dist/prod/*", //not working while type command ng build
"test": "echo \"Error: no test specified\" && exit 1",
"lint": "ng lint",
"e2e": "ng e2e",
"gulp": "gulp"
},
"dependencies": {
"gulp-htmlmin": "^5.0.1",
"gulp-imagemin": "^5.0.3",
"gulp-minify-css": "^1.2.4",
"gulp-uglify": "^3.0.1",
},
"devDependencies": {
"gulp": "^3.9.1",
}
您可以将gulp安装为Dev依赖项。然后添加gulp命令以&&开头。举个例子
“开始”:“gulp <command> && serve”