build: Cleanup build scripts and watchers#2236
Merged
Merged
Conversation
- Dropped node-watch dependency and replaced it with native fs.watch - Updated build-styles.mjs to use a single buildAll function instead of separate buildThemes and buildComponents functions - Improved logging in stories-watcher.js to include timestamps and better error handling - Updated dev dependencies in package.json
Contributor
There was a problem hiding this comment.
Pull request overview
This PR streamlines the local/build tooling by removing the node-watch dependency in favor of Node’s native fs.watch, consolidating Sass build steps behind a single buildAll() entrypoint, and refining story metadata generation/logging.
Changes:
- Replace
node-watchusage with nativefs.watchin the SCSS and stories watchers. - Add
buildAll()to unify theme + component Sass generation and update build scripts to use it. - Refactor
build-stories.mjsfor more robust manifest parsing/type handling and reduce unnecessary file writes; bump several dev dependencies.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| stories/date-time-input.stories.ts | Updates Storybook args/argTypes ordering and typing for DateTimeInput. |
| scripts/styles-watcher.mjs | Switches SCSS watcher from node-watch to fs.watch and improves log messages. |
| scripts/stories-watcher.js | Switches metadata watcher to fs.watch and updates logging/error handling. |
| scripts/sass.mjs | Introduces buildAll() and refactors theme/component build functions. |
| scripts/build.mjs | Uses buildAll(true) during publish builds instead of separate theme/component builds. |
| scripts/build-styles.mjs | Uses buildAll() for local style generation. |
| scripts/build-stories.mjs | Refactors story metadata generation (typing, parsing, write strategy, error handling). |
| package.json | Updates dev dependency versions and removes node-watch. |
| package-lock.json | Locks updated dependency graph reflecting package.json changes. |
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.
Description