在哪里指定删除输出路径? [英] Where to specify delete-output-path?
问题描述
我有一个 Node Express 项目,通过 Angular CLI 添加了 Angular,即 ng new
.
I have a Node Express project with Angular added through Angular CLI, ie ng new
.
我不希望 Angular 输出清除分发文件夹.
I do not want the Angular output to wipe out the distribution folder.
我知道有一个 delete-output-path
参数可以放在 ng build
的命令行上.
I understand there is a delete-output-path
parameter that can be put on the command line to ng build
.
是否可以将其放在 angular-cli.json 中?
Is it possible to put this in angular-cli.json?
还是应该在 tsconfig.json 中?在哪个属性下?
Or should it be in tsconfig.json? Under which property?
推荐答案
是的,你可以.你必须像这样把它放在 .angular-cli.json 的 defaults 属性下:
Yes, you can. You have to put it under defaults property of .angular-cli.json like this:
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"project": {
"name": "project-name"
},
"apps": [
{// app property values here}
],
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
}
},
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "scss",
"component": {},
"serve": {
"port": 3000
},
"build": {
"deleteOutputPath": false
}
}
}
如果你想了解更多关于这个文件的结构,你可以去这里
If you want to learn more about this file's structure, you can go here
希望有帮助:)
这篇关于在哪里指定删除输出路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!