coderedcorp / django-sass

The absolute simplest way to use Sass with Django. Pure Python, minimal dependencies, no special configuration required!
Other
71 stars 7 forks source link

Major rewrite required: dart-sass integration #13

Open vsalvino opened 3 years ago

vsalvino commented 3 years ago

libsass, which powers dozens of wrappers including the official Python sass library, has sadly been deprecated by the sass team.

Therefore, we must figure out a new way to integrate with sass - via either some kind of horrific Dart-To-Python integration, or via subprocess using the official sass CLI tool.

For this reason, our sass/scss features are relatively frozen as of October 2020 since that is when the deprecation happened.

Read about it here: https://sass-lang.com/blog/libsass-is-deprecated

thibaudcolas commented 2 years ago

pytailwindcss / django-tailwind might be a good source of inspiration? It’s based on a CLI for Tailwind that has been packaged with a Node runtime via pkg (see https://github.com/tailwindlabs/tailwindcss/blob/master/standalone-cli/package.json) – essentially so a Django-aware project can tap into the Sass CLI as you describe, without requiring people to also have Node installed on their machine.

vsalvino commented 2 years ago

Thanks for the links - will check it out.

My thought was to package the static dart-sass CLI binary with the pip package for each platform. First check if sass is on the PATH, if so use it, if not then fall back to the packaged binary.