Anton Malykhin commited on
Commit
54bc653
·
1 Parent(s): 2526f60

ci: generate Paraglide before Svelte checks

Browse files

- add explicit paraglide script for generated i18n output
- make pnpm check generate Paraglide before running svelte-check
- make check:watch use the same generated-output preparation
- keep GitLab CI validate step clean: pnpm check + pnpm build
- avoid adding a separate Paraglide generation step to Dockerfile
- document that pnpm check generates Paraglide output internally
- fix CI failure where clean GitLab runners could not resolve $lib/paraglide modules

Files changed (2) hide show
  1. docs/huggingface-space-deploy.md +1 -1
  2. package.json +3 -2
docs/huggingface-space-deploy.md CHANGED
@@ -90,7 +90,7 @@ HF_SPACE_REPO=hivetrace/guard-leaderboard
90
 
91
  1. `validate`
92
  - `pnpm install --frozen-lockfile`
93
- - `pnpm check`
94
  - `pnpm build`
95
 
96
  2. `deploy:huggingface`
 
90
 
91
  1. `validate`
92
  - `pnpm install --frozen-lockfile`
93
+ - `pnpm check` (внутри генерирует Paraglide output)
94
  - `pnpm build`
95
 
96
  2. `deploy:huggingface`
package.json CHANGED
@@ -8,9 +8,10 @@
8
  "dev": "vite dev",
9
  "build": "vite build",
10
  "preview": "vite preview",
 
11
  "prepare": "svelte-kit sync || echo ''",
12
- "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
13
- "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
14
  "lint": "prettier --check . && eslint src eslint.config.js --cache --cache-location .eslintcache",
15
  "format": "prettier --write ."
16
  },
 
8
  "dev": "vite dev",
9
  "build": "vite build",
10
  "preview": "vite preview",
11
+ "paraglide": "paraglide-js compile --project ./project.inlang --outdir ./src/lib/paraglide",
12
  "prepare": "svelte-kit sync || echo ''",
13
+ "check": "pnpm run paraglide && svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
14
+ "check:watch": "pnpm run paraglide && svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
15
  "lint": "prettier --check . && eslint src eslint.config.js --cache --cache-location .eslintcache",
16
  "format": "prettier --write ."
17
  },