sass-extract icon indicating copy to clipboard operation
sass-extract copied to clipboard

Support for Dart Sass (possibility for using custom implementation)

Open bencergazda opened this issue 5 years ago • 7 comments

@jgranstrom This should not be too difficult to implement. I would be happy to send a PR for this.

bencergazda avatar Nov 15 '19 10:11 bencergazda

How terrible would something like this be?

let sass;
try {
 sass = require('node-sass');
} catch(err) {
  try {
    sass = require('sass');
  } catch(err2) {
    throw new Error("Unable to find a sass implementation to use");
  }
}

avindra avatar Feb 09 '20 19:02 avindra

FWIW, I tried symlinking node-sass to sass, and that wasn't enough. Got some other nebulous error using that approach. So, I would think supporting both might involve more than just replacing the import statements.

avindra avatar Feb 09 '20 19:02 avindra

@avindra The basic implementation is ready, but unfortunately we still have some things to fix, before every test gets passed.

bencergazda avatar Feb 10 '20 12:02 bencergazda

@bencergazda Thanks for the heads up. That branch is here for anyone who looking:

https://github.com/jgranstrom/sass-extract/compare/master...bencergazda:feat-dart-sass

avindra avatar Feb 10 '20 15:02 avindra

Would be a great feature! Thanks @bencergazda

guoyunhe avatar Mar 25 '20 11:03 guoyunhe

@bencergazda what is the situation of this? Is there anything I could help with?

aapzu avatar Dec 05 '20 19:12 aapzu

@Aapzu Sorry for the delay. Unfortunately, I didn't have time during the past months to fix the remaining failing tests. Any help is welcome.

Please feel free to fork https://github.com/bencergazda/sass-extract/tree/feat-dart-sass (starting from 91a9c3d9), I am going help if needed in anything.

bencergazda avatar Dec 11 '20 22:12 bencergazda

@bencergazda I fixed the remaining failing tests, but I had to use a dirty trick https://github.com/bencergazda/sass-extract/compare/feat-dart-sass...athorcis:feat-dart-sass

Athorcis avatar Sep 03 '23 18:09 Athorcis

@Athorcis Super, thanks! I will check the changes as soon as I have a little time.

bencergazda avatar Sep 09 '23 12:09 bencergazda

@Athorcis I looked over the files and they seem to be OK to me. Thanks for fixing the tests! Would you open a PR in @bencergazda/sass-extract? I might ask for documenting a few lines, but otherwise I would be happy to merge it.

bencergazda avatar Oct 04 '23 21:10 bencergazda

@bencergazda Here's the PR : bencergazda/sass-extract#3

Athorcis avatar Oct 05 '23 17:10 Athorcis

Wow, feel free to PR

jgranstrom avatar Oct 10 '23 04:10 jgranstrom

@jgranstrom Created PR #51

bencergazda avatar Oct 10 '23 20:10 bencergazda