question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for Dart Sass

See original GitHub issue

Dart Sass is in Release Candidate phase now, with a full release probably coming next week. It would be great to add support to this package for choosing between Node Sass and Dart Sass. I’m willing to create a pull request, but I’m not sure what the best design would be.

Right now, this package has a compiler field that can be configured, like so:

var sass = require('gulp-sass');
sass.compiler = require('dart-sass');

However, because gulp-sass includes Node Sass in its dependencies, this still requires users to get Node Sass even if they want to use Dart Sass—which is often a big pain, since that can involve building C code. One way around this would be to remove Node Sass as a dependency and require users to pass in the version of the compiler they want to use, either using the existing API or using something like

var sass = require('gulp-sass')(require('dart-sass'));

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:20
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

17reactions
nex3commented, May 20, 2018

I’d really like Dart Sass to be a first-class implementation, and naming its package gulp-dart-sass while the package named gulp-sass only supports Node Sass doesn’t really frame it that way. I’d prefer to see a solution where users explicitly decide which implementation to use, possibly using the pattern I outlined above, even if that does increase the first-time setup friction somewhat.

We see relatively few issues with regards to installation of node-sass.

@xzyfer You and I may be hearing from different people, but I’ve heard a lot of noise around people who have had bad Node Sass installation experiences.

4reactions
xzyfercommented, May 8, 2018

We see relatively few issues with regards to installation of node-sass. Our resolution to this issue will be to enable dart-sass as an option for those who want it, without introducing any new friction to the millions of monthly downloads that happen issue free.

Given the nature of gulp packages I see space for a gulp-dart-sass to live along side gulp-ruby-sass etc…

On Tue., 8 May 2018, 6:31 pm Matt Steele, notifications@github.com wrote:

Want to bump and continue discussion. Dependency-wise, being able to avoid a download of node-sass would be a big plus unless the user opts-in.

Based on the conversation in sindresorhus/grunt-sass#278 https://github.com/sindresorhus/grunt-sass/issues/278, I’m not sure there’s a tractable solution:

  • Setting up dart-sass and node-sass as peerDependencies will trigger warnings for whichever is missing
  • Setting optionalDependencies will trigger a download, and fail if the node-sass binary is missing; which isn’t great either
  • We could declare neither but that’s not really a great DX

Any other options?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dlmanning/gulp-sass/issues/672#issuecomment-387462801, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjZWCJ9i1-DXpV7XdV3Ad1xbwo7Ohygks5twchegaJpZM4S5cEe .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dart Sass
When installed via npm, Dart Sass supports a JavaScript API that aims to be compatible with Node Sass. Full compatibility is a work...
Read more >
dart-sass - npm
A pure JavaScript implementation of Sass.. Latest version: 1.25.0, last published: 3 years ago. Start using dart-sass in your project by ...
Read more >
The reference implementation of Sass, written in Dart. - GitHub
Install Dart. If you download an archive manually rather than using an installer, make sure the SDK's bin directory is on your PATH...
Read more >
Dart SCSS Support Request - Visual Studio Feedback
Adding my voice here that the version of Sass supported by Visual Studio, LibSass has been deprecated for two years. Dart Sass, the...
Read more >
How to Install Dart Sass in Windows? - GeeksforGeeks
Follow the below steps to install dart Saas n Windows: Step 1: In your browser navigate to this link. Step 2: After going...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found