Skip to content

Commit b8ee70b

Browse files
committed
add verison in the html se ppl can see the version on the app + bump version
1 parent a18329c commit b8ee70b

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
</style>
3333
</head>
3434
<body>
35-
<div class="controls"><strong>ALPHA RELEASE</strong> | MMB: Click and drag to pan | DOUBLE CLICK: add new node | SHIFT+A : open | SHIFT+S : save | <a href="https://github.com/bandinopla/three.js-visual-node-editor" target="_blank">Github Page</a></div>
35+
<div class="controls"><strong>ALPHA RELEASE v%APP_VERSION%</strong> | MMB: Click and drag to pan | DOUBLE CLICK: add new node | SHIFT+A : open | SHIFT+S : save | <a href="https://github.com/bandinopla/three.js-visual-node-editor" target="_blank">Github Page</a></div>
3636
<canvas id="app" width="1024" height="1024"></canvas>
3737
<script type="module" src="/src/main.ts"></script>
3838
</body>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "tsl-nodes",
33
"private": true,
4-
"version": "0.0.2",
4+
"version": "0.0.3",
55
"type": "module",
66
"repository": {
77
"type": "git",

vite.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { defineConfig } from 'vite'
2+
import packageJson from './package.json'; // Import package.json
23

34
// https://vite.dev/config/
45
export default defineConfig(({ mode }) => {
@@ -10,6 +11,9 @@ export default defineConfig(({ mode }) => {
1011
server: {
1112
host: '0.0.0.0',
1213
port: 5173, // Replace with your desired port if needed
13-
}
14+
} ,
15+
define: {
16+
'import.meta.env.APP_VERSION': JSON.stringify(packageJson.version), // Define the version
17+
},
1418
}
1519
})

0 commit comments

Comments
 (0)