Add static-data

This commit is contained in:
tree🌴 2023-02-13 13:37:29 +01:00
parent 2f2f5b7b09
commit c015250750
3 changed files with 5 additions and 0 deletions

View file

@ -25,6 +25,9 @@ jobs:
- name: Install dependencies
run: npm ci
- name: Generate static JSON file with data
run: npm run static-data
- name: Build
run: npm run build

1
.gitignore vendored
View file

@ -8,3 +8,4 @@ node_modules
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
static/data.json

View file

@ -6,6 +6,7 @@
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"static-data": "node -e \"(async function () { const data=await import('./src/lib/config.js');console.log(JSON.stringify(data.default, null, 2)); })()\" > static/data.json",
"lint": "prettier --plugin-search-dir . --check . && eslint .",
"format": "prettier --plugin-search-dir . --write ."
},