From b922f6ae57bec3ecd6058d70ba073e6c70a1d080 Mon Sep 17 00:00:00 2001 From: Kyle D McCormick Date: Fri, 15 May 2026 21:36:29 -0400 Subject: [PATCH 1/2] refactor: Make brand-sample one layer simpler This collapses brand-sample/src into brand-sample. The extra layer did not seem to be serving a purpose. It confused me over and over again when I was debugging tutor-contrib-paragon. This also drops the Makefile and merges its on rule (build) into package.json, removing the unnecessary package.json<->Makefile indirection that was going on. --- brand-sample/.gitignore | 3 ++- brand-sample/{src => }/.nvmrc | 0 brand-sample/README.md | 2 +- brand-sample/{src => }/package-lock.json | 0 brand-sample/{src => }/package.json | 5 +++-- brand-sample/src/.gitignore | 3 --- brand-sample/src/Makefile | 4 ---- brand-sample/src/README.md | 11 ----------- .../tokens/src/themes/light/global/color.json | 0 9 files changed, 6 insertions(+), 22 deletions(-) rename brand-sample/{src => }/.nvmrc (100%) rename brand-sample/{src => }/package-lock.json (100%) rename brand-sample/{src => }/package.json (82%) delete mode 100644 brand-sample/src/.gitignore delete mode 100644 brand-sample/src/Makefile delete mode 100644 brand-sample/src/README.md rename brand-sample/{src => }/tokens/src/themes/light/global/color.json (100%) diff --git a/brand-sample/.gitignore b/brand-sample/.gitignore index cbdb961..f9f89ba 100644 --- a/brand-sample/.gitignore +++ b/brand-sample/.gitignore @@ -1 +1,2 @@ -!dist +node_modules +paragon diff --git a/brand-sample/src/.nvmrc b/brand-sample/.nvmrc similarity index 100% rename from brand-sample/src/.nvmrc rename to brand-sample/.nvmrc diff --git a/brand-sample/README.md b/brand-sample/README.md index 09b5a41..077f637 100644 --- a/brand-sample/README.md +++ b/brand-sample/README.md @@ -61,7 +61,7 @@ hooks.Filters.ENV_PATCHES.add_item( 2. Navigate to your Tutor config directory (you can find this by running `tutor config printroot`) 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`) 4. You should see some directories in there, find the `theme-sources` directory. -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. +5. Place this theme's [`color.json` file](./tokens/src/themes/light/global/color.json) in the appropriate subdirectory of the `theme-sources` directory. ```sh $ tree ~/.local/share/tutor-main/env/plugins/paragon ├── [...] diff --git a/brand-sample/src/package-lock.json b/brand-sample/package-lock.json similarity index 100% rename from brand-sample/src/package-lock.json rename to brand-sample/package-lock.json diff --git a/brand-sample/src/package.json b/brand-sample/package.json similarity index 82% rename from brand-sample/src/package.json rename to brand-sample/package.json index 5e47d86..9a2af09 100644 --- a/brand-sample/src/package.json +++ b/brand-sample/package.json @@ -16,8 +16,9 @@ "scripts": { "build-tokens": "paragon build-tokens --source ./tokens/src --build-dir ./paragon/css --source-tokens-only --exclude-core", "build-scss": "paragon build-scss --themesPath ./paragon/css/themes --defaultThemeVariants light --excludeCore", - "build": "make build", - "build:watch": "nodemon --ignore dist -x \"make build\"", + "clean": "rm -rf dist && mkdir dist", + "build": "npm run clean && npm run build-tokens && npm run build-scss", + "build:watch": "nodemon --ignore dist -x \"npm run build\"", "paragon:help": "paragon help" }, "devDependencies": { diff --git a/brand-sample/src/.gitignore b/brand-sample/src/.gitignore deleted file mode 100644 index d47d0f6..0000000 --- a/brand-sample/src/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -paragon -dist \ No newline at end of file diff --git a/brand-sample/src/Makefile b/brand-sample/src/Makefile deleted file mode 100644 index e5d5d85..0000000 --- a/brand-sample/src/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -build: - rm -rf dist && mkdir dist - npm run build-tokens - npm run build-scss diff --git a/brand-sample/src/README.md b/brand-sample/src/README.md deleted file mode 100644 index a97e44e..0000000 --- a/brand-sample/src/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# brand-sample - -This directory contains the source design tokens for the example brand package. - -## Building - -```sh -nvm use -npm ci -make build -``` diff --git a/brand-sample/src/tokens/src/themes/light/global/color.json b/brand-sample/tokens/src/themes/light/global/color.json similarity index 100% rename from brand-sample/src/tokens/src/themes/light/global/color.json rename to brand-sample/tokens/src/themes/light/global/color.json From 7d52bf5a41bd11f8bda30ae23cfe1c800f1e23b0 Mon Sep 17 00:00:00 2001 From: Kyle D McCormick Date: Sat, 16 May 2026 18:34:26 -0400 Subject: [PATCH 2/2] fix: re-add dist ignore --- brand-sample/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/brand-sample/.gitignore b/brand-sample/.gitignore index f9f89ba..9806fbc 100644 --- a/brand-sample/.gitignore +++ b/brand-sample/.gitignore @@ -1,2 +1,3 @@ +!dist node_modules paragon