Reorganize scripts into focused subdirectories by function#3426
Draft
jpzwarte wants to merge 1 commit into
Draft
Reorganize scripts into focused subdirectories by function#3426jpzwarte wants to merge 1 commit into
jpzwarte wants to merge 1 commit into
Conversation
Each subfolder now owns its own dependencies, making it clear what each group of scripts requires and easier to update them independently: - scripts/build/ — TypeScript and SCSS compilation (esbuild, sass) - scripts/cem/ — Custom Elements Manifest generation and plugins - scripts/docs/ — i18n extraction and Angular story template extraction - scripts/icons/ — Icon import from FontAwesome Pro and Figma - scripts/qa/ — Backwards compatibility checks and a11y test runner - scripts/themes/ — Theme CSS generation from tokens and theme folder setup - scripts/tokens/ — Design token import from Tokens Studio All call-sites updated: root package.json wireit commands, workspaces list, cem-angular-wrapper.config.mjs, packages/angular/package.json, and website/custom-elements-manifest.config.js. https://claude.ai/code/session_01WaV4D4B4FvnP9dBjBkeA5n
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR restructures the monorepo’s scripts/ folder into function-focused workspace packages (build, CEM, docs, icons, QA, themes, tokens) and updates script/import references across the repo to match the new layout.
Changes:
- Split
scripts/into multiple Yarn workspaces with dedicatedpackage.jsonfiles and scoped dependencies. - Updated Wireit commands and config imports to point to the new script locations.
- Added QA helpers for website a11y URL selection and reorganized CEM generation/plugins under
scripts/cem/.
Reviewed changes
Copilot reviewed 23 out of 32 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| website/package.json | Updates CEM plugin file references to new scripts/cem/ paths. |
| website/custom-elements-manifest.config.js | Updates imports to CEM plugins in scripts/cem/. |
| scripts/tokens/package.json | Adds dedicated workspace manifest for token import script. |
| scripts/tokens/.tokensstudio.json | Fixes output path after moving token scripts into scripts/tokens/. |
| scripts/themes/setup.js | Adjusts relative paths for theme setup after script relocation. |
| scripts/themes/package.json | Adds dedicated workspace manifest/deps for theme build tooling. |
| scripts/themes/build.js | Updates theme/token paths for new scripts/themes/ location. |
| scripts/qa/run-website-a11y-test.js | Adds wrapper script to pass URL selection into website a11y tests. |
| scripts/qa/package.json | Adds dedicated workspace manifest for QA scripts. |
| scripts/qa/get-changed-urls.js | Adds logic to compute changed website URLs and write changed-urls.json. |
| scripts/qa/backwards-compatibility-check.js | Updates usage text to the new script path under scripts/qa/. |
| scripts/qa/backwards-compatibility-check-README.md | Updates documentation paths for the moved QA script. |
| scripts/icons/package.json | Renames/repurposes workspace package metadata to icon tooling only. |
| scripts/icons/output-pages-to-folders-svg.js | Adds a local figma-export outputter used by the icons pipeline. |
| scripts/icons/import.js | Updates token/theme relative paths after moving to scripts/icons/. |
| scripts/icons/.figmaexportrc.js | Updates theme output path for new script location and uses local outputter. |
| scripts/docs/README-extract-story-templates.md | Updates docs to reference new scripts/docs/ location. |
| scripts/docs/package.json | Adds dedicated workspace manifest/deps for docs generation scripts. |
| scripts/docs/extract-story-templates.js | Updates Angular stories input/output paths after relocation. |
| scripts/docs/extract-i18n.js | Updates component glob paths after moving to scripts/docs/. |
| scripts/cem/utils.js | Adds utility string helpers used by CEM Angular wrapper plugin. |
| scripts/cem/plugins.js | Introduces CEM plugins module under new scripts/cem/ structure. |
| scripts/cem/plugin-event-decorator.js | Moves event decorator plugin under scripts/cem/. |
| scripts/cem/plugin-angular-wrapper.js | Moves Angular wrapper generator plugin under scripts/cem/. |
| scripts/cem/package.json | Adds dedicated workspace manifest/deps for CEM generation tooling. |
| scripts/cem/build.js | Updates CEM build script paths/imports for new structure. |
| scripts/build/styles.js | Adds SCSS→CSS→TS template pipeline and updates Wireit references. |
| scripts/build/packages.js | Adds esbuild-based TS compilation helper for packages/examples. |
| scripts/build/package.json | Adds dedicated workspace manifest/deps for build scripts. |
| packages/angular/package.json | Updates extract-template commands to new scripts/docs/ location. |
| package.json | Updates workspaces list and Wireit commands to new script locations. |
| cem-angular-wrapper.config.mjs | Updates imports to the relocated CEM Angular wrapper/event plugins. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Restructured the
scripts/directory to organize build and utility scripts into focused subdirectories based on their functionality, improving maintainability and clarity of the monorepo's build system.Key Changes
Created functional script subdirectories:
scripts/build/- TypeScript and SCSS compilation (packages.js, styles.js)scripts/cem/- Custom Elements Manifest generation and pluginsscripts/docs/- Documentation generation (i18n extraction, story templates)scripts/icons/- Icon import from FontAwesome and Figmascripts/qa/- Quality assurance (backwards compatibility, a11y testing)scripts/themes/- Theme CSS generation and setupscripts/tokens/- Design token import from Tokens StudioUpdated package.json workspaces configuration to reference individual script subdirectories instead of the entire
scripts/folderCreated dedicated package.json files for each script subdirectory with appropriate dependencies and descriptions
Updated all script references throughout the monorepo:
package.jsonscripts and wireit configurationsAdjusted relative paths in all moved scripts to account for the new directory structure (e.g.,
../packages/→../../packages/)Implementation Details
Each script subdirectory now has its own
package.jsonwith only the dependencies required for that specific functionality, reducing unnecessary dependency bloat and making the purpose of each script directory explicit. The workspace configuration in the rootpackage.jsonwas updated to include all subdirectories, allowing yarn to properly resolve workspace dependencies.All internal path references were updated to maintain correct relative paths from the new script locations to shared resources like
packages/andtools/.https://claude.ai/code/session_01WaV4D4B4FvnP9dBjBkeA5n