Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

makefile: move npm scripts #107

Merged
merged 2 commits into from
Jan 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
use flake
export $(xargs <.env)
4 changes: 2 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
with:
node-version: "20"

- name: get deps
- name: Get dependencies
run: npm ci

- name: Run pocketbase-typegen
run: make pb_types

- name: Lint and check formatting
run: npm run lint
run: make lint
3 changes: 2 additions & 1 deletion docs/contribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Vi har code-review for merge til main og previews på alle nye pull requests.
Formater koden din og fiks feilmeldinger og advarsler før du commit-er:

```bash
npm run lint
make format
make lint
```

### Retningslinjer
Expand Down
18 changes: 13 additions & 5 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,22 @@
default: dev

dev: pb_types
@npm run dev
npx vite dev

build: pb_types
@npm run build
npx vite build

db:
@docker compose up
docker compose up

pb_types:
@echo Reading schema from $(PUBLIC_PB_HOST)
@npx --yes [email protected] --url $(PUBLIC_PB_HOST) --email $(PB_ADMIN_EMAIL) --password $(PB_ADMIN_PASSWORD) --out ./src/lib/pocketbase/index.d.ts
@npx pocketbase-typegen --url $(PUBLIC_PB_HOST) --email $(PB_ADMIN_EMAIL) --password $(PB_ADMIN_PASSWORD) --out ./src/lib/pocketbase/index.d.ts

format:
npx prettier --write .

lint:
npx prettier --check .
npx svelte-kit sync
npx svelte-check --tsconfig ./tsconfig.json
npx eslint src
Loading
Loading