phcode-dev / phoenix

Phoenix is a modern open-source Code Editor for the web, built for the browser.
https://phcode.io
GNU Affero General Public License v3.0
1.68k stars 117 forks source link

[feat] SASS/SCSS compilation for live preview #1778

Open abose opened 2 months ago

abose commented 2 months ago

Describe the problem

https://www.reddit.com/r/brackets/comments/1ec06x8/phoenix_code_sass_compiler/

Phoenix should natively be able to compile *.scss files like Brackets SASS (which doesn't work on Phoenix Code).

Brackets SASS is not supported in Phoenix

As we moved to a modern node platform(node 20) instead of the node 6 version brackets used, we lost all old node extension compatibility. This was a necessary upgrade as the ancient node brackets had has security issues and modern libs wont run in them.

Also the libsass used by the extension has been deprecated since 2020, with no new commits. they have recommended to move to newer sass libs. we need to migrate to the new framework.

Describe the solution you'd like

Similar to Brackets SASS which uses libsass which is deprecated by the sass community. We will need to move to the newer dart/js-based sass libs. Since this is a first party integration, we need to study the fully sass lifecycle to be robust.

Alternatives considered

https://github.com/jasonsanjose/brackets-sass

Additional context

https://www.reddit.com/r/brackets/comments/1ec06x8/phoenix_code_sass_compiler/