get/set已被弃用,而使用config命令 [英] get/set have been deprecated in favor of the config command

查看:215
本文介绍了get/set已被弃用,而使用config命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

Using angular-cli at the command line, I executed:

ng set defaults.styleExt styl

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

to set the default styling to Stylus and I got this response:

获取/设置已被弃用,而使用config命令

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

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

I want to change the style extension on an EXISTING project to use SCSS. How do I do this using the config command? Where is the documentation for ng config?

我正在使用Angular CLI v6.0.0

I am using Angular CLI v6.0.0

ng帮助说:

config获取/设置配置值

config Get/set configuration values

但不详细说明.谢谢

推荐答案

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

For Angular 6 you want to use the following command:

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

这会自动将提到的示意图"部分上半部分添加到angular.json文件中.

This will automatically add the "schematics" section halfer mentioned to the angular.json file.

这是官方文档: https://github.com/angular/angular-cli/wiki/stories -css-预处理器

这篇关于get/set已被弃用,而使用config命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆