get/set 已被弃用,取而代之的是 config 命令 [英] get/set have been deprecated in favor of the config command

查看:29
本文介绍了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:

get/set 已被弃用,取而代之的是 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 help 说:

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天全站免登陆