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

Implement sass --embedded in pure JS mode #344

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ntkme
Copy link
Contributor

@ntkme ntkme commented Oct 26, 2024

sass/dart-sass#2413

This PR changes how compiler is setup for local development. Instead of symlink the compiler into a special vendor directory:

  • Dart: link build/dart-sass/build -> node_modules/sass-embedded-${platform}-${arch}/dart-sass.
  • Pure JS: link build/dart-sass/build/npm -> node_modules/sass.

Only one kind of compiler will be installed by init.ts, that the other kind will be removed if exists.

In the compiler-path.ts, loading the compiler is attempted in the order of:

  • dart runtime + snapshot for release (bypassing the script for slightly better performance)
  • dart sass wrapper script for local development
  • node + sass.js for platforms without dart support

@ntkme ntkme force-pushed the embedded-compiler branch from 9683817 to 2b23fac Compare October 26, 2024 02:34
@ntkme ntkme marked this pull request as ready for review October 26, 2024 02:50
@ntkme ntkme marked this pull request as draft October 26, 2024 03:40
@ntkme ntkme force-pushed the embedded-compiler branch 2 times, most recently from a57567f to ec05f2d Compare October 26, 2024 17:16
@ntkme ntkme closed this Oct 28, 2024
@ntkme ntkme deleted the embedded-compiler branch October 28, 2024 00:27
@ntkme ntkme restored the embedded-compiler branch October 28, 2024 03:43
@ntkme ntkme reopened this Oct 28, 2024
@ntkme ntkme force-pushed the embedded-compiler branch from ec05f2d to 75f77ee Compare October 28, 2024 03:45
@ntkme ntkme marked this pull request as ready for review October 28, 2024 03:46
@ntkme ntkme force-pushed the embedded-compiler branch 4 times, most recently from 5d51360 to b2dfcb2 Compare October 28, 2024 21:40
bin/sass.ts Outdated Show resolved Hide resolved
@ntkme ntkme force-pushed the embedded-compiler branch 12 times, most recently from d233142 to dd17ebb Compare November 2, 2024 03:54
@ntkme ntkme force-pushed the embedded-compiler branch 2 times, most recently from 40830fb to e194ac7 Compare November 4, 2024 21:26
@ntkme ntkme force-pushed the embedded-compiler branch 2 times, most recently from b7b9035 to c00802a Compare November 11, 2024 21:45
@ntkme ntkme force-pushed the embedded-compiler branch 2 times, most recently from ba02b49 to 4744393 Compare November 15, 2024 02:12
@ntkme ntkme force-pushed the embedded-compiler branch from 4744393 to cabc7ef Compare December 10, 2024 18:08
@Goodwine Goodwine requested a review from nex3 December 10, 2024 21:05
@ntkme ntkme force-pushed the embedded-compiler branch from cabc7ef to 7334197 Compare December 12, 2024 01:58
@ntkme ntkme force-pushed the embedded-compiler branch from 7334197 to c1ad745 Compare December 12, 2024 23:00
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

Successfully merging this pull request may close these issues.

1 participant