You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(cli): use 'vite test' replace 'vitest' command (#206)
### TL;DR
Improved monorepo template scripts and added silent flag to npm install tests.
### What changed?
- Updated monorepo template scripts in `package.json` to use more descriptive names:
- Changed `prepublishOnly` to `build:all`
- Changed `test` to `test:all`
- Updated the `ready` script to use the new script names
- Added `--silent` flag to npm install commands in snap tests to reduce output verbosity
- Enhanced the `fixPackageJsonForVitePlus` function to properly update test scripts
- Simplified the monorepo template's `vite.config.ts` by replacing the test projects configuration with commented placeholders
- Updated snap tests to display package.json contents for better verification
- Changed vitest config import to use `@voidzero-dev/vite-plus`
### How to test?
1. Create a new monorepo project: `vp new my-monorepo --template monorepo`
2. Verify the root package.json has the updated script names
3. Add a new library: `vp new --lib packages/my-lib --template react`
4. Check that the library's package.json has the correct test script
5. Run the CLI snap tests: `vite test packages/cli/snap-tests/npm-install-with-options`
### Why make this change?
The script naming improvements make the monorepo template more intuitive and consistent. The `build:all` and `test:all` names better reflect their purpose of running these commands across all packages. Adding the silent flag to npm install tests reduces noise in test output, making it easier to focus on relevant information. The package.json display in snap tests provides better verification of template generation.
0 commit comments