-
Notifications
You must be signed in to change notification settings - Fork 72
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
Migrate to Dart Sass #942
Migrate to Dart Sass #942
Conversation
Signed-off-by: Matt Provost <[email protected]>
Signed-off-by: Matt Provost <[email protected]>
@BSFishy I see you generally went with the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BSFishy, really good changes!
- The solution provided by @joshuarrrr is working, we can use
calc
instead ofmath.div
to avoid linter errors - We can indeed migrate to Stylelint, mostly the changes will be regarding automatic fixing by linter
- I don't think that this is breaking change, but it would be good to take a look at diff
Signed-off-by: Matt Provost <[email protected]>
Signed-off-by: Matt Provost <[email protected]>
Signed-off-by: Matt Provost <[email protected]>
Signed-off-by: Matt Provost <[email protected]>
Signed-off-by: Matt Provost <[email protected]>
Signed-off-by: Matt Provost <[email protected]>
Signed-off-by: Matt Provost <[email protected]>
Signed-off-by: Matt Provost <[email protected]>
The more I work on this, the more I realize we will most likely need to profile our sass build to see where we're getting performance hits. I have a feeling it's the way we include files. Either way, I think I'm going to need to put this PR on hold until that gets fixed |
Superseded by #1001 |
Description
Migrate to Dart Sass instead of using
node-sass
.A few things:
sass-extract
withsass-extract-dart
to work with Dart Sasssass_extract
, as Node bindings are a little finicky and async doesn't seem to actually be running in asyncmath.div
, as slash division is deprecated in Dart Sassexec
function in compile script to allow for proper async (Javascript eagerly executes promises, so we can't useexecSync
or wrap it in a custom promise)sass-extract-dart
supports extracting array types, whichsass-extract
didn't)Questions:
#{math.div(...)}
syntax.sass-lint
isn't able to parse this, where it throws an error. We could solve this in 2 ways: quick and easy or long and maintainablesass-lint
in unmaintained and is clearly causing us issues. However, I don't know how much effort it might be to migrate. To compare with the migration that happened in OSD (Sass lint OpenSearch-Dashboards#1413), 240 files changed, but it looks like most of them were fixing linter issues?Check List
yarn lint
yarn test-unit
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.