feat: slightly better watch mode (#1398)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Added a script to automatically prepare UI components before running
the build watch process in the web app.
- **Bug Fixes**
- Improved build and release processes to ensure directories are
properly cleaned and created, preventing potential errors during Docker
operations.
- **Chores**
- Updated build watch scripts for faster development feedback and more
efficient parallel execution.
- Refined Docker Compose configuration to use the correct release
directory for plugin builds.
- Introduced a new script to streamline and centralize file watching and
build triggering in the plugin system.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Eli Bosley
2025-05-22 10:42:08 -07:00
committed by GitHub
parent 7067e9e3dd
commit 881f1e0960
9 changed files with 32 additions and 5 deletions
+8 -1
View File
@@ -49,12 +49,19 @@ try {
await writeFile('package.json', JSON.stringify(parsedPackageJson, null, 4));
await $`XZ_OPT=-5 tar -cJf packed-node-modules.tar.xz node_modules`;
const compressionLevel = process.env.WATCH_MODE ? '-1' : '-5';
await $`XZ_OPT=${compressionLevel} tar -cJf packed-node-modules.tar.xz node_modules`;
// Create a subdirectory for the node modules archive
await mkdir('../node-modules-archive', { recursive: true });
await $`mv packed-node-modules.tar.xz ../node-modules-archive/`;
await $`rm -rf node_modules`;
// Clean the release directory
await $`rm -rf ../release/*`;
// Copy other files to release directory
await $`cp -r ./* ../release/`;
// chmod the cli
await $`chmod +x ./dist/cli.js`;
await $`chmod +x ./dist/main.js`;