diff --git a/.github/workflows/check-prepare-sources.yaml b/.github/workflows/check-prepare-sources.yaml new file mode 100644 index 0000000..452f303 --- /dev/null +++ b/.github/workflows/check-prepare-sources.yaml @@ -0,0 +1,30 @@ +name: Check prepare-sources +on: + push: + paths: + - prepare-sources/** + pull_request: + paths: + - prepare-sources/** + +jobs: + check: + runs-on: ubuntu-latest + defaults: + run: + working-directory: prepare-sources + steps: + - name: Checkout repository + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - name: Setup Vite+ + uses: voidzero-dev/setup-vp@313600b80b104eadebb9111787d37a2e83e014ca # v1.17.0 + with: + working-directory: prepare-sources + cache: true + + - name: Lint and typecheck + run: vp check + + - name: Run tests + run: vp test diff --git a/prepare-sources/.vscode/extensions.json b/prepare-sources/.vscode/extensions.json new file mode 100644 index 0000000..46cef3b --- /dev/null +++ b/prepare-sources/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["VoidZero.vite-plus-extension-pack"] +} diff --git a/prepare-sources/.vscode/settings.json b/prepare-sources/.vscode/settings.json new file mode 100644 index 0000000..86e0fc5 --- /dev/null +++ b/prepare-sources/.vscode/settings.json @@ -0,0 +1,23 @@ +{ + "npm.scriptRunner": "vp", + "editor.defaultFormatter": "oxc.oxc-vscode", + "[javascript]": { + "editor.defaultFormatter": "oxc.oxc-vscode" + }, + "[javascriptreact]": { + "editor.defaultFormatter": "oxc.oxc-vscode" + }, + "[typescript]": { + "editor.defaultFormatter": "oxc.oxc-vscode" + }, + "[typescriptreact]": { + "editor.defaultFormatter": "oxc.oxc-vscode" + }, + "oxc.disableNestedConfig": true, + "oxc.fmt.disableNestedConfig": true, + "editor.formatOnSave": true, + "editor.formatOnSaveMode": "file", + "editor.codeActionsOnSave": { + "source.fixAll.oxc": "explicit" + } +} diff --git a/prepare-sources/AGENTS.md b/prepare-sources/AGENTS.md new file mode 100644 index 0000000..e3c5ba1 --- /dev/null +++ b/prepare-sources/AGENTS.md @@ -0,0 +1,27 @@ + + +# Using Vite+, the Unified Toolchain for the Web + +This project uses Vite+ for tooling (Vitest, Oxlint, Oxfmt). Vite+ wraps these tools in a single global CLI called `vp`. Run `vp help` to print a list of commands and `vp --help` for information about a specific command. + +Docs are local at `node_modules/vite-plus/docs` or online at https://viteplus.dev/guide/. + +## Built-in Commands vs Scripts + +`vp ` runs a built-in command. `vp run ` runs a `package.json` script or a `vite.config.ts` task. Scripts cannot overwrite built-ins, so `vp dev` and `vp run dev` may do different things. Check `package.json` and `vite.config.ts` first, and run `vp run ` when the project defines a script or task with that name. + +## Tool Versions + +Run `vp toolchain` to show versions and relationships in the active Vite+ +release. Add a tool name to select part of the graph. For example, run +`vp toolchain vite`. Use `--global` to ignore the local `vite-plus` package. Use +`vp why ` to show the package-manager dependency graph. + +## Review Checklist + +- [ ] Run `vp install` after pulling remote changes and before getting started. +- [ ] Run `vp check` and `vp test` to format, lint, type check and test changes. +- [ ] Check if there are `vite.config.ts` tasks or `package.json` scripts necessary for validation, run via `vp run