在最终与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集成在一起?
发布评论