Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using sass with angular2dart

Tags:

dart

How can I use https://github.com/sass/dart-sass with angular2dart. For example, I have following component:

@Component(
    selector: 'start-app',
    directives: const[MaterialInputComponent],
    styleUrls: const ['login_component.css'],
    templateUrl: 'login_component.html')

Now instead of css, I would like to use sass.

like image 897
softshipper Avatar asked Nov 21 '25 09:11

softshipper


1 Answers

I don't think there is an easy way currently, because there is no transformer. What you can do is build some watcher or script file that searches all files and compiles them to CSS. You can for example use https://github.com/dart-lang/build but it requires some development. It won't do anything out-of-the-box

I'd suggest using https://pub.dartlang.org/packages/dart_sass_transformer until tooling is available.

like image 72
Günter Zöchbauer Avatar answered Nov 24 '25 23:11

Günter Zöchbauer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!