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

feat: generate paragon-theme.json during npm run build with themeUrls #2333

Merged
merged 3 commits into from
May 29, 2023

Conversation

adamstankiewicz
Copy link
Member

@adamstankiewicz adamstankiewicz commented May 29, 2023

Description

Generates a paragon-theme.json file in dist output directory containing relative paths to the compiled core and theme variant CSS paths:

{
  "themeUrls": {
    "core": {
      "default": "./core.css",
      "minified": "./core.min.css"
    },
    "variants": {
      "light": {
        "default": "./light.css",
        "minified": "./light.min.css"
      }
    }
  }
}

The paragon.config.json file will be parsed by @edx/frontend-build to avoid needing to hardcode core.min.css or light.min.css into its code explicitly, rather relying on the paths provided by Paragon itself.

Related PR: openedx/frontend-build#365

Deploy Preview

N/A

Merge Checklist

  • If your update includes visual changes, have they been reviewed by a designer? Send them a link to the Netlify deploy preview, if applicable.
  • Does your change adhere to the documented style conventions?
  • Do any prop types have missing descriptions in the Props API tables in the documentation site (check deploy preview)?
  • Were your changes tested using all available themes (see theme switcher in the header of the deploy preview, under the "Settings" icon)?
  • Were your changes tested in the example app?
  • Is there adequate test coverage for your changes?
  • Consider whether this change needs to reviewed/QA'ed for accessibility (a11y). If so, please add wittjeff and adamstankiewicz as reviewers on this PR.

Post-merge Checklist

  • Verify your changes were released to NPM at the expected version.
  • If you'd like, share your contribution in #show-and-tell.
  • 🎉 🙌 Celebrate! Thanks for your contribution.

@codecov
Copy link

codecov bot commented May 29, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.02%. Comparing base (9a94ac5) to head (20b90b6).
Report is 908 commits behind head on alpha.

Additional details and impacted files
@@           Coverage Diff           @@
##            alpha    #2333   +/-   ##
=======================================
  Coverage   91.02%   91.02%           
=======================================
  Files         214      214           
  Lines        3534     3534           
  Branches      860      860           
=======================================
  Hits         3217     3217           
  Misses        309      309           
  Partials        8        8           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@adamstankiewicz adamstankiewicz marked this pull request as ready for review May 29, 2023 15:40
@adamstankiewicz adamstankiewicz changed the title feat: generate paragon.config.json during npm run build with themeUrls feat: generate paragon-theme.json during npm run build with themeUrls May 29, 2023
Copy link
Member

@brobro10000 brobro10000 left a comment

Choose a reason for hiding this comment

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

Approved with a minor nit of renaming some of the variables from ParagonConfig to ParagonThemingConfig but no big deal 👍🏽

@adamstankiewicz adamstankiewicz merged commit a2ac304 into alpha May 29, 2023
@adamstankiewicz adamstankiewicz deleted the ags/paragon-config-build branch May 29, 2023 16:30
@edx-semantic-release
Copy link
Contributor

🎉 This PR is included in version 21.0.0-alpha.29 🎉

The release is available on:

Your semantic-release bot 📦🚀

monteri pushed a commit to raccoongang/paragon that referenced this pull request Aug 17, 2023
…openedx#2333)

* feat: generate paragon.config.json during npm run build with themeUrls
* fix: rename to paragon-theme.json
* chore: rename paragonConfig
PKulkoRaccoonGang pushed a commit to raccoongang/paragon that referenced this pull request Aug 18, 2023
…openedx#2333)

* feat: generate paragon.config.json during npm run build with themeUrls
* fix: rename to paragon-theme.json
* chore: rename paragonConfig
@edx-semantic-release
Copy link
Contributor

🎉 This PR is included in version 22.0.0-alpha.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@openedx-semantic-release-bot

🎉 This PR is included in version 23.0.0-alpha.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

PKulkoRaccoonGang pushed a commit that referenced this pull request Aug 1, 2024
…#2333)

* feat: generate paragon.config.json during npm run build with themeUrls
* fix: rename to paragon-theme.json
* chore: rename paragonConfig
PKulkoRaccoonGang pushed a commit that referenced this pull request Aug 4, 2024
…#2333)

* feat: generate paragon.config.json during npm run build with themeUrls
* fix: rename to paragon-theme.json
* chore: rename paragonConfig
PKulkoRaccoonGang pushed a commit that referenced this pull request Aug 4, 2024
…#2333)

* feat: generate paragon.config.json during npm run build with themeUrls
* fix: rename to paragon-theme.json
* chore: rename paragonConfig
PKulkoRaccoonGang pushed a commit that referenced this pull request Aug 5, 2024
…#2333)

* feat: generate paragon.config.json during npm run build with themeUrls
* fix: rename to paragon-theme.json
* chore: rename paragonConfig
@openedx-semantic-release-bot

🎉 This PR is included in version 23.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants