This template should help get you started developing with Vue 3 in Vite.
VSCode + Volar (and disable Vetur).
See Vite Configuration Reference.
npm install
npm run dev
npm run build
Run Unit Tests with Vitest
npm run test:unit
Run 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 -- --debug
Lint 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
admin@indyhackers.org
and password inpb/migrations/1726527259_add_admin.js
) - the pocketbase auto-migrate feature will create migrations in
pb/migrations
when you update the schema in the admin UI - adding records is done by
export-mocks
andimport-mocks
subcommands- you can:
docker exec -it pocketbase /usr/local/bin/pocketbase --hooksDir /pb_hooks --dir /pb_data export-mocks
to 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.json
and add to git - can manually run the importer with the
import-mocks
subcommand
- you can:
- for now ignore
.dev
extension removals in git when time to commit
this should allow us to rapidly prototype our schemas and test data in a reliable fashion