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
- After Rust edits: ensure `cargo test` in `src-tauri` passes. Clippy is a bonus.
106
-
- After modifying a Rust struct exposed via `ts-rs`: run `npm run gen:types` and commit the output.
107
-
- After editing the configuration of a route, regenerating the route-tree must be done via the `build` script.
103
+
- After modifying a Rust struct exposed via `ts-rs`: run `vp run gen:types` and commit the output.
104
+
- After editing the configuration of a route, regenerating the route-tree must be done via the `vp build` script.
108
105
- Never manually edit `src/generated` — always regenerate.
109
106
- Don't fix pre-existing issues unrelated to the current task.
110
107
- When uncertain, read nearby file patterns first, then ask.
108
+
109
+
<!--VITE PLUS START-->
110
+
111
+
# Using Vite+, the Unified Toolchain for the Web
112
+
113
+
This project is using Vite+, a unified toolchain built on top of Vite, Rolldown, Vitest, tsdown, Oxlint, Oxfmt, and Vite Task. Vite+ wraps runtime management, package management, and frontend tooling in a single global CLI called `vp`. Vite+ is distinct from Vite, but it invokes Vite through `vp dev` and `vp build`.
114
+
115
+
## Vite+ Workflow
116
+
117
+
`vp` is a global binary that handles the full development lifecycle. Run `vp help` to print a list of commands and `vp <command> --help` for information about a specific command.
118
+
119
+
Vite+ automatically detects and wraps the underlying package manager such as pnpm, npm, or Yarn through the `packageManager` field in `package.json` or package manager-specific lockfiles.
120
+
121
+
### Start
122
+
123
+
- create - Create a new project from a template
124
+
- migrate - Migrate an existing project to Vite+
125
+
- config - Configure hooks and agent integration
126
+
- staged - Run linters on staged files
127
+
- install (`i`) - Install dependencies
128
+
- env - Manage Node.js versions
129
+
130
+
### Develop
131
+
132
+
- dev - Run the development server
133
+
- check - Run format, lint, and TypeScript type checks
134
+
- lint - Lint code
135
+
- fmt - Format code
136
+
- test - Run tests
137
+
138
+
### Execute
139
+
140
+
- run - Run monorepo tasks
141
+
- exec - Execute a command from local `node_modules/.bin`
142
+
- dlx - Execute a package binary without installing it as a dependency
143
+
- cache - Manage the task cache
144
+
145
+
### Build
146
+
147
+
- build - Build for production
148
+
- pack - Build libraries
149
+
- preview - Preview production build
150
+
151
+
### Manage Dependencies
152
+
153
+
- add - Add packages to dependencies
154
+
- remove (`rm`, `un`, `uninstall`) - Remove packages from dependencies
155
+
- update (`up`) - Update packages to latest versions
156
+
- dedupe - Deduplicate dependencies
157
+
- outdated - Check for outdated packages
158
+
- list (`ls`) - List installed packages
159
+
- why (`explain`) - Show why a package is installed
160
+
- info (`view`, `show`) - View package information from the registry
161
+
- link (`ln`) / unlink - Manage local package links
162
+
- pm - Forward a command to the package manager
163
+
164
+
### Maintain
165
+
166
+
- upgrade - Update `vp` itself to the latest version
167
+
168
+
These commands map to their corresponding tools. For example, `vp dev --port 3000` runs Vite's dev server and works the same as Vite. `vp test` runs JavaScript tests through the bundled Vitest. The version of all tools can be checked using `vp --version`. This is useful when researching documentation, features, and bugs.
169
+
170
+
## Common Pitfalls
171
+
172
+
-**Using the package manager directly:** Do not use pnpm, npm, or Yarn directly. Vite+ can handle all package manager operations.
173
+
-**Always use Vite commands to run tools:** Don't attempt to run `vp vitest` or `vp oxlint`. They do not exist. Use `vp test` and `vp lint` instead.
174
+
-**Running scripts:** Vite+ commands take precedence over `package.json` scripts. If there is a `test` script defined in `scripts` that conflicts with the built-in `vp test` command, run it using `vp run test`.
175
+
-**Do not install Vitest, Oxlint, Oxfmt, or tsdown directly:** Vite+ wraps these tools. They must not be installed directly. You cannot upgrade these tools by installing their latest versions. Always use Vite+ commands.
176
+
-**Use Vite+ wrappers for one-off binaries:** Use `vp dlx` instead of package-manager-specific `dlx`/`npx` commands.
177
+
-**Import JavaScript modules from `vite-plus`:** Instead of importing from `vite` or `vitest`, all modules should be imported from the project's `vite-plus` dependency. For example, `import { defineConfig } from 'vite-plus';` or `import { expect, test, vi } from 'vite-plus/test';`. You must not install `vitest` to import test utilities.
178
+
-**Type-Aware Linting:** There is no need to install `oxlint-tsgolint`, `vp lint --type-aware` works out of the box.
179
+
180
+
## Review Checklist for Agents
181
+
182
+
-[ ] Run `vp install` after pulling remote changes and before getting started.
183
+
-[ ] Run `vp check` and `vp test` to validate changes.
-`vp env use` to setup Node.js and the package manager
93
94
94
95
### Development Mode
95
96
96
-
-`npm ci`
97
-
-`npm run tauri dev`
97
+
-`vp install`
98
+
-`vp run tauri dev`
98
99
99
100
This will launch Museeks in dev mode. Hot reload will work out-of-the-box, so when you update a `.js` file, the UI will automatically update. When you edit a `.rs` file, Museeks will automatically rebuild.
100
101
101
102
### Package Binaries
102
103
103
-
-`npm ci`
104
-
-`npm run tauri build`
104
+
-`vp install`
105
+
-`vp run tauri build`
105
106
106
107
Tauri does not support cross-platform binaries, so the command will only generate binaries for your current platform (macOS, Linux, or Windows).
107
108
@@ -110,7 +111,7 @@ Tauri does not support cross-platform binaries, so the command will only generat
110
111
- Follow the steps from the "Setup" and "Development Mode" sections
111
112
- Go to `src/translations/languages.ts`
112
113
- Add your language information to the list
113
-
- Run `npm run gen:translations`
114
+
- Run `vp run gen:translations`
114
115
- This will create a new file `<your_language_code>.po` in the same folder
115
116
- Fill in the translations from the created `.po` file
0 commit comments