gpt4 book ai didi

angular - get/set 已被弃用,取而代之的是 config 命令

转载 作者:太空狗 更新时间:2023-10-29 16:49:43 24 4
gpt4 key购买 nike

在命令行中使用 angular-cli,我执行了:

ng set defaults.styleExt styl

将默认样式设置为 Stylus,我得到了这个响应:

get/set have been deprecated in favor of the config command

我想更改现有项目的样式扩展以使用 SCSS。我如何使用 config 命令执行此操作? ng config 的文档在哪里?

我正在使用 Angular CLI v6.0.0

ng 帮助说:

config Get/set configuration values

但没有详细说明。谢谢

最佳答案

对于 Angular 6,您要使用以下命令:

ng config schematics.@schematics/angular:component.styleext styl

这会自动将提到的“原理图”部分添加到 angular.json 文件中。

官方文档如下: https://github.com/angular/angular-cli/wiki/stories-css-preprocessors

关于angular - get/set 已被弃用,取而代之的是 config 命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50223165/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com