Dart是否与SASS集成在一起?

编程入门 行业动态 更新时间:2024-10-07 14:30:50
本文介绍了Dart是否与SASS集成在一起?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在最终与AngularDart(2.0)变得更加亲密之后,我决定将SASS加入到关系中。看来SASS开发人员也正在向Dart求助,向Sart求助(两个月前)。

After finally becoming more intimate with AngularDart (2.0), I decided to throw SASS into the relationship. It appears the SASS devs are also coming over to Dart SASS to Dart (two months ago).

知道, @Component(styleUrls:'style.sass')似乎无法识别 .sass 或 .scss 扩展名。在时间轴上是否有任何知识或更新或对兼容性的期望?地狱,甚至是SASS的Dart酒馆(我觉得后者可能在这里,但我掩饰了它)。

Knowing that, the @Component( styleUrls: 'style.sass') doesn't appear to recognize the .sass or .scss extensions. Is there any knowledge or update on a timeline or expectancy to compatibility? Hell, maybe even a Dart pub for SASS (I feel like the latter might be here, but I glossed over it).

推荐答案

Dart 2 在具有 build_runner 的Dart 2中,只需添加

Dart 2 In Dart 2 with build_runner just add

dev_dependencies: sass_builder: ^1.1.2

到 pubspec.yaml

Dart 1

改用

@Component( styleUrls: 'style.css')

,然后在您的 pubspec.yaml

pub.dartlang/packages/dart_sass_transformer

dependencies: dart_sass_transformer: ^0.5.0 transformers: - dart_sass_transformer:

然后 style.sass 或 style.scss 将自动转换为 style.css 并提供给Angular组件

then style.sass or style.scss will automatically be transformed to style.css and made available to Angular components

您需要运行 pub get --packages-dir 直到 github/sass/dart-sass/pull/53 可用。

更多推荐

Dart是否与SASS集成在一起?

本文发布于:2023-11-23 22:07:03,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1622986.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Dart   SASS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!