Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discussion: npm package which uses Dart VM version instead of JavaScript #1040

Closed
JakeChampion opened this issue Jul 1, 2020 · 1 comment

Comments

@JakeChampion
Copy link

Hi,

My team were looking to improve the compile times of our sass projects and noticed that the Dart VM version of sass was much faster than the version compiled to JavaScript.

We really liked the fact the JavaScript version was simple to install for NodeJS users via npm and wanted to make the Dart VM version have the same simple install process. We ended up implementing this ourselves using the precompiled binaries from the dart-sass GitHub releases and using package.json's optional-dependencies and os and arch fields to figure out which binary to install.

It has really helped speed up our compile times and required very little work from our users to switch to our version. All they needed to do was npm un -D sass && npm i -D @financial-times/sass.

I was wondering if the dart-sass team have thought about distributing the Dart VM version on npm and if that would be of interest? I imagine other users may like to have the speed improvements that the Dart VM version benefits from whilst also being able to install via npm.

Here is a link the the package we made -- https://github.com/Financial-Times/sass/

Thank you so much for working on sass, it is a really great language <3

@jathak
Copy link
Member

jathak commented Jul 1, 2020

Duplicate of #248.

This is being worked on here, which, when complete, will even allow JS custom importers and functions to be used, but have the actual compilation run through the native Dart version.

In the meantime, those who want access to the native Dart version through a package manager can use Pub (pub global activate sass) or Homebrew (brew install sass/sass/sass).

@jathak jathak closed this as completed Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants