Skip to content
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
4 changes: 2 additions & 2 deletions deploy/README-DEPLOY.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ Target layout:
`-- package-lock.json # if you use npm ci
```

## 1) Install Node.js 20 LTS
## 1) Install Node.js 22 (22.12.0 or newer)

```
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
```

Expand Down
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
</div>
<p id="landing-status" class="text-xs text-base-content/60"></p>
</div>
<div class="absolute bottom-6 right-6 flex items-center gap-4">
<div class="absolute bottom-6 left-6 right-6 flex flex-wrap items-center justify-end gap-x-4 gap-y-2">
<span id="app-version" class="text-xs text-base-content/60">Version %APP_VERSION%</span>
<a
href="https://github.com/haan/sourceprinter"
class="link link-primary text-xs"
Expand Down
11 changes: 11 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
import { readFileSync } from 'node:fs';
import { defineConfig } from 'vite';

const { version } = JSON.parse(readFileSync(new URL('./package.json', import.meta.url), 'utf8'));

export default defineConfig({
plugins: [
{
name: 'app-version',
transformIndexHtml(html) {
return html.replace('%APP_VERSION%', version);
},
},
],
server: {
proxy: {
'/api': 'http://127.0.0.1:3001',
Expand Down
Loading