【发布时间】:2019-02-27 02:13:36
【问题描述】:
您好,我需要通过 npm start 运行 gulp 命令。
当我使用命令运行 gulp 时,它正在工作,但我需要运行命令 通过 npm start 或 ng build 命令自动完成
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",
}
【问题讨论】: