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

Migrate to Dart Sass from LibSass #3034

Merged
merged 5 commits into from
Jan 22, 2024
Merged

Migrate to Dart Sass from LibSass #3034

merged 5 commits into from
Jan 22, 2024

Conversation

jon-kirwan
Copy link
Contributor

@jon-kirwan jon-kirwan commented Jan 5, 2024

What

Migrate to Dart Sass from LibSass.

Why

Visual Changes

None.

How can I test these changes?

  • run yarn jasmine:prepare (or run bundle exec rake app:assets:clobber app:assets:precompile)
  • what should happen? The Sass files should be compiled. Keep an eye on the command line for warnings indicating the compilation process using Dart Sass
Deprecation Warning: Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div(300%, 4) or calc(300% / 4)
More info and automated migrator: https://sass-lang.com/d/slash-div
   │
26 │   three-quarters: (300% / 4),
   │                    ^^^^^^^^
   ...
  • the /builds folder: app/assets/builds should now be populated with CSS files. Note, the
  • subsequently, all assets ought to be generated successfully within the /public directory
  • no test failures to indicate the correct number of stylesheets are generated
  • deploy to Integration. You'll notice that in the 'build and publish image' task, the steps taken resemble those mentioned earlier, dartsass-rails is bundled and any Dart Sass warnings encountered during the compilation process are reported)
  • inspect several pages, e.g.
    guide
    , detailed guide, HTML publication, news article, specialist document, statistical dataset, foreign travel advice, worldwide organisation to ensure the absence of errors.

Anything else

Once the PR gets the green light, any temporary commits and references to local gems e.g. gem "govuk_publishing_components", path: "../govuk_publishing_components" will be removed.

See:

@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-3034 January 5, 2024 09:46 Inactive
@jon-kirwan jon-kirwan force-pushed the migrate-to-dart-sass branch from 33d8e7b to 68305bf Compare January 5, 2024 09:49
@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-3034 January 5, 2024 09:50 Inactive
@jon-kirwan jon-kirwan force-pushed the migrate-to-dart-sass branch from 68305bf to a2a55c9 Compare January 12, 2024 10:23
@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-3034 January 12, 2024 10:23 Inactive
@jon-kirwan jon-kirwan force-pushed the migrate-to-dart-sass branch from a2a55c9 to eaabcf5 Compare January 12, 2024 10:30
@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-3034 January 12, 2024 10:30 Inactive
@jon-kirwan jon-kirwan force-pushed the migrate-to-dart-sass branch from eaabcf5 to c91f4c3 Compare January 12, 2024 15:43
@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-3034 January 12, 2024 15:43 Inactive
@jon-kirwan jon-kirwan force-pushed the migrate-to-dart-sass branch from c91f4c3 to 3c2a90d Compare January 17, 2024 14:18
@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-3034 January 17, 2024 14:18 Inactive
@jon-kirwan jon-kirwan force-pushed the migrate-to-dart-sass branch from 3c2a90d to d45241a Compare January 17, 2024 14:57
@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-3034 January 17, 2024 14:58 Inactive
Copy link
Contributor

@matthillco matthillco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally and on integration. Looks good, no errors or warnings. Nice job.

- Create `dartsass.builds` initializer and add all Sass files to be compiled. See https://github.com/rails/dartsass-rails#configuring-builds
- Create .keep
- Update manifest file to use /builds directory
- Ignore /builds
Also, turn digests off in development
@jon-kirwan jon-kirwan force-pushed the migrate-to-dart-sass branch from d45241a to d738a71 Compare January 22, 2024 10:31
@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-3034 January 22, 2024 10:31 Inactive
@jon-kirwan jon-kirwan changed the title Migrate to Dart Sass from LibSass Migrate to Dart Sass from LibSass Jan 22, 2024
@jon-kirwan jon-kirwan merged commit 046dccf into main Jan 22, 2024
12 checks passed
@jon-kirwan jon-kirwan deleted the migrate-to-dart-sass branch January 22, 2024 10:37
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.

3 participants