jedfoster / SassMeister

The Sass playground
http://sassmeister.com
199 stars 25 forks source link

Keep Dart Sass version up-to-date automatically #202

Closed nex3 closed 10 months ago

nex3 commented 6 years ago

Dart Sass releases frequently, and it's easy for SassMeister to become out-of-date. For example, SassMeister currently uses Dart Sass 1.2.1, when the most recently-released version is 1.6.1. To help alleviate this, I think it makes sense to automate the process. I see three steps to this:

  1. Figure out how to update the Dart Sass dependency. Right now, it looks like the code on the master branch of this repo doesn't refer to Dart Sass at all. (@jedfoster, is it possible that you haven't pushed your most recent changes to GitHub?) In order to automatically update the version, we need a way to refer to the version in the first place.

  2. Add infrastructure to automatically update the dependency when Dart Sass is published. We use Travis to auto-update various other repositories, so it wouldn't be hard to add support for this one as well. I can handle this as long as @sassbot is added as a committer.

  3. Deploy to the web every time this repo is updated. I'm not sure what deployment infrastructure the site uses, so I'm not sure how hard this would be.

jedfoster commented 6 years ago

The app code here is not the entire app, just the front end client-side app and API proxy server. The actual Dart compiler is a separate repo that is not yet public.

I recently migrated the Dart Sass and LibSass compilers to AWS Lambda. Building node-sass for Lambda is a PITA, but the Dart version is a breeze and should be pretty easy to script. I have a box I can set up to check for Dart Sass updates and rebuild and redeploy the function.

xzyfer commented 6 years ago

Building node-sass for Lambda is a PITA

Curious to know what the difficult is. It should "just work". Is the issue that you're working on OSX and need to fetch the linux binary to package up for lambda?

jedfoster commented 6 years ago

@xzyfer bingo. I had to spin up an EC2 instance just to build the binary. Docker should have worked as well, but I must have been doing something wrong because I couldn’t get it right.

xzyfer commented 6 years ago

We'll eventually make it you can fetch the binary for the system you want via npm, but for now you can

$ mkdir node_modules/node-sass/vendor/linux-x64-59
$ wget https://github.com/sass/node-sass/releases/download/latest/linux-x64-59_binding.node -O node_modules/node-sass/vendor/linux-x64-59/binding.node

The 59 will depend on your node version

$ node -p process.versions.modules

The v4.9.0 is whatever version of node-sass you're installing.

xzyfer commented 6 years ago

Alternatively you can mount the app directory into docker and run npm rebuild node-sass (inside the container) to fetch the right binary for the current environment.

A simple npm install won't fetch the binary because of an npm feature bug.

nex3 commented 5 years ago

@jedfoster Is there something we can do to help out here? The SassMeister version of Dart Sass is very out of date again (1.6.2 vs 1.18.0).

stof commented 3 years ago

@jedfoster any progress on this ? dart-sass is outdated again (1.26.11 vs 1.32.2)

thany commented 2 years ago

Quite heavily out of date actually now. The deprecated / is succeeded by math.div which doesn't yet exist in the latest dart-sass on Sassmeister. So code with math.div breaks.