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: add defaults to theme-urls.json output on build #2468

Merged
merged 3 commits into from
Jul 23, 2023

Conversation

adamstankiewicz
Copy link
Member

@adamstankiewicz adamstankiewicz commented Jul 23, 2023

Description

Extends build-scss.js Node.js script to include optional --defaultThemeVariants option to customize the default theme variants to include in the theme-urls.json output.

node build-scss.js --defaultThemeVariants light
node build-scss.js --defaultThemeVariants light dark

Ensures the theme-urls.json output looks like the following, with the additional of the defaults object property in favor of the previous default and dark properties:

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

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.

@netlify
Copy link

netlify bot commented Jul 23, 2023

Deploy Preview for paragon-openedx ready!

Name Link
🔨 Latest commit 151216e
🔍 Latest deploy log https://app.netlify.com/sites/paragon-openedx/deploys/64bd447a2d72f50008a5e648
😎 Deploy Preview https://deploy-preview-2468--paragon-openedx.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@adamstankiewicz adamstankiewicz merged commit f72bd32 into alpha Jul 23, 2023
7 checks passed
@adamstankiewicz adamstankiewicz deleted the ags/theme-urls-json-defaults branch July 23, 2023 15:21
@edx-semantic-release
Copy link
Contributor

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

The release is available on:

Your semantic-release bot 📦🚀

@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 📦🚀

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.

3 participants