refactor: replace node-sass by sass #1373
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of changes:
As
node-sass
is deprecated, we're replacing it with its successor Dart Sass, which even also has a npm package.Additionally removing package
node-sass-selector-importer
, which got introduced with commit 3d38d43, but never seems to have been used within the SCSS source code.And we needed to switch to the new Dart Sass syntax for divisions within some of the
scss
files; this process got simplified by the usage ofsass-migrator
/npx sass-migrator division **/**.scss
:This would as well prevent some node-gyp warnings that might pop up in edge cases, as Dart Sass is a direct JavaScript implementation of SASS.
I've checked the output of the operation within the file https://github.com/pattern-lab/patternlab-node/pull/1373/files#diff-16d6427ba133722f108966c95c3eae01b3942556dd26ad24271950e0c9f5bd63R26 line by line both for using
node-sass
andsass
and it's equal (content-wise, except for different formatting):