watcher.js auto updates sub library modules for hot-reloading greatness #393
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.
Overview:
Added watcher.js, when ran with
npm run watcher
the script will auto update sub library modules for hot-reloading greatness.Builds sub libraries with
npx tsc --build ./tsconfig.json
when appropriate.Copies changed css and scss files when appropriate (tsx and s/css have different logic).
Summary of Changes:
npm run watcher
incremental
to all sub library tsconfig.json files. This allows tsx to build only changed files, not forcing a full reload.Testing Steps:
npm run start
andnpm run watcher
concurrently.tapisui-common
.tapis-ui/lib/tapisui-common/src/ui/Tabs/Tabs.module.scss
and you'll get a hot-reload.UI Photos:
Notes:
As of now a developer would need to run
npm run start
andnpm run watcher
as two separate processes.Sometimes changes to s/css force a large-ish reload. I think that's when the changes proliferate to many places. Still pretty quick.
This all might be doable with vite in some other way. I couldn't find too much in that regard online.
Added chokidar library which provides watcher utilities.