This template should help get you started developing with Vue 3 in Vite.
VSCode + Volar (and disable Vetur).
See Vite Configuration Reference.
npm installnpm run devnpm run buildRun Unit Tests with Vitest
npm run test:unitRun End-to-End Tests with Playwright
# Install browsers for the first run
npx playwright install
# When testing on CI, must build the project first
npm run build
# Runs the end-to-end tests
npm run test:e2e
# Runs the tests only on Chromium
npm run test:e2e -- --project=chromium
# Runs the tests of a specific file
npm run test:e2e -- tests/example.spec.ts
# Runs the tests in debug mode
npm run test:e2e -- --debugLint with ESLint
npm run lint- docker-compose sets developmentmode, build arg in Dockerfile defaults to production
- which a pocketbase entry hook detects and moves all pocketbase hooks hook.pb.js.dev => hook.pb.js in dev env
- hooks with the dev prefix aren't installed in production (as they exfiltrate data potentially)
- while using docker-compose, you can add new test records using the pocketbase admin UI (user
[email protected]and password inpb/migrations/1726527259_add_admin.js) - the pocketbase auto-migrate feature will create migrations in
pb/migrationswhen you update the schema in the admin UI - adding records is done by
export-mocksandimport-mockssubcommands- you can:
docker exec -it pocketbase /usr/local/bin/pocketbase --hooksDir /pb_hooks --dir /pb_data export-mocksto dump the existing data records - I might be able to do this automatically, but for now if you want to commit the new mock state
cp pb/hooks/mocks.json src/mocks/mocks.jsonand add to git - can manually run the importer with the
import-mockssubcommand
- you can:
- for now ignore
.devextension removals in git when time to commit
this should allow us to rapidly prototype our schemas and test data in a reliable fashion