Skip to content

Commit 7656682

Browse files
committed
Single file
apparently vitepwa svg broke
1 parent fcb826f commit 7656682

7 files changed

Lines changed: 2121 additions & 1489 deletions

File tree

.github/workflows/single-file.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Create single file build
2+
3+
on:
4+
push:
5+
branches: ["*"]
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: "pages"
10+
cancel-in-progress: false
11+
12+
jobs:
13+
deploy:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Use Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: "22" # Using latest Node 22 for 2026 compatibility
23+
24+
- name: Install dependencies
25+
working-directory: Build
26+
run: npm i
27+
28+
- name: Build
29+
working-directory: Build
30+
run: npm run build:single
31+
32+
- name: Rename for distribution
33+
working-directory: Build/dist
34+
run: mv index.html LRCGetter.html
35+
36+
- name: Upload Build Artifact
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: LRCGetter-Standalone
40+
path: Build/dist/LRCGetter.html
41+
if-no-files-found: error

Build/package-lock.json

Lines changed: 1353 additions & 775 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Build/package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"scripts": {
77
"dev": "vite",
88
"build": "vite build",
9+
"build:single": "cross-env SINGLE_FILE=true npm run build",
910
"preview": "vite preview",
1011
"test": "echo \"Error: no test specified\" && exit 1"
1112
},
@@ -25,7 +26,8 @@
2526
},
2627
"devDependencies": {
2728
"@vite-pwa/assets-generator": "^1.0.1",
28-
"sharp": "^0.34.4",
29-
"vite-plugin-pwa": "^1.0.3"
29+
"cross-env": "^10.1.0",
30+
"vite-plugin-pwa": "^1.0.3",
31+
"vite-plugin-singlefile": "^2.3.0"
3032
}
31-
}
33+
}

Build/pwa-assets.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import {
2+
defineConfig,
3+
minimal2023Preset as preset
4+
} from '@vite-pwa/assets-generator/config'
5+
6+
export default defineConfig({
7+
headLinkOptions: {
8+
preset: '2023'
9+
},
10+
preset,
11+
images: ['public/source-image.svg']
12+
})

0 commit comments

Comments
 (0)