Skip to content

Commit aff8617

Browse files
kdmccormickclaude
andcommitted
feat: Change brand-sample from Purple to 'Autumn'
Also, make the readme steps copy-able Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent ccc9a1d commit aff8617

4 files changed

Lines changed: 201 additions & 75 deletions

File tree

brand-sample/README.md

Lines changed: 37 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# brand-sample
22

3-
**This is a simple example brand package that changes the `brand` color to purple.**
3+
**This is a simple example brand package that changes the `brand` colors to an autumn-inspired palette.**
44

55
### Before
66
![Screenshot of the Authn MFE with this brand package enabled](./docs/images/authn-without-theme.png)
@@ -56,23 +56,43 @@ hooks.Filters.ENV_PATCHES.add_item(
5656

5757
#### Using the [Tutor Paragon Plugin](https://github.com/openedx/openedx-tutor-plugins/tree/main/plugins/tutor-contrib-paragon) (Recommended)
5858

59-
1. [Install](https://github.com/openedx/openedx-tutor-plugins/tree/main/plugins/tutor-contrib-paragon#installation) and [enable](https://github.com/openedx/openedx-tutor-plugins/tree/main/plugins/tutor-contrib-paragon#enable-the-plugin) the Tutor Paragon Plugin (`tutor-contrib-paragon`)
60-
2. [Build](https://github.com/openedx/openedx-tutor-plugins/tree/main/plugins/tutor-contrib-paragon#build-the-paragon-image) the `paragon-builder` image.
61-
2. Navigate to your Tutor config directory (you can find this by running `tutor config printroot`)
62-
3. From your config directory, navigate to `env/plugins/paragon` (the full path on my dev machine is `~/.local/share/tutor-main/env/plugins/paragon`)
63-
4. You should see some directories in there, find the `theme-sources` directory.
64-
5. Place this theme's [`color.json` file](./src/tokens/src/themes/light/global/color.json) in the appropriate subdirectory of the `theme-sources` directory.
65-
```sh
66-
$ tree ~/.local/share/tutor-main/env/plugins/paragon
67-
├── [...]
68-
└── theme-sources
69-
└── themes
70-
└── light
71-
└── global
72-
└── color.json
59+
Set up the Tutor Paragon plugin, which will reproducibly compile and serve brands for you:
60+
```bash
61+
# Install and enable the Tutor Paragon plugin.
62+
tutor plugins install https://github.com/openedx/openedx-tutor-plugins/tree/main/plugins/tutor-contrib-paragon
63+
tutor plugins enable paragon
64+
65+
# Build the paragon-builder image.
66+
# With this built, the `tutor local do paragon-build-tokens` command becomes available.
67+
tutor images build paragon-buidler
68+
69+
# Ensure MFE containers is running if it isn't already.
70+
# The MFE image will serve the CSS that you compile with paragon-build-tokens.
71+
tutor dev start -d lms cms mfe
72+
```
73+
74+
Every time you edit a theme, copy it into your tutor root and re-run paragon-build-tokens. Run this from the root of the sample-plugin repository:
75+
76+
```bash
77+
tutor_root="$(tutor config printroot)"
78+
[ -n "$tutor_root" ] \
79+
&& rm -rf "$tutor_root/env/plugins/paragon/theme-sources/themes" \
80+
&& cp -r brand-sample/src/tokens/src/themes "$tutor_root/env/plugins/paragon/theme-sources" \
81+
&& tutor local do paragon-build-tokens
82+
|| echo 'Could not copy design token sources into tutor environment!'
83+
```
84+
85+
Note: If you are having issues building the tokens, check the contents of your tutor root:
86+
87+
```bash
88+
tree "$(tutor config printroot)/env/plugins/paragon"
89+
├── [...]
90+
└── theme-sources
91+
└── themes
92+
└── light
93+
└── global
94+
└── color.json
7395
```
74-
6. [Build](https://github.com/openedx/openedx-tutor-plugins/tree/main/plugins/tutor-contrib-paragon#build-all-themes) the theme
75-
7. Start `tutor` (`tutor dev start lms cms mfe` or `tutor local start lms cms mfe`)
7696

7797
### ***OR*** manually add to an MFE's `env.config.js(x)`
7898
Minimal `env.config.js` to install this theme
163 KB
Loading
160 KB
Loading

0 commit comments

Comments
 (0)