convert to using vite
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,6 +4,7 @@ node_modules
|
||||
# build files
|
||||
build/
|
||||
dist/
|
||||
/public/
|
||||
|
||||
# local storage
|
||||
storage/
|
||||
|
||||
1038
package-lock.json
generated
1038
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -7,12 +7,14 @@
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"start": "electron .",
|
||||
"dist": "python setup.py build && electron-builder --publish=never"
|
||||
"dist": "vite build && python setup.py build && electron-builder --publish=never"
|
||||
},
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^5.1.2",
|
||||
"electron": "^30.0.8",
|
||||
"electron-builder": "^24.6.3"
|
||||
"electron-builder": "^24.6.3",
|
||||
"vite": "^5.3.5"
|
||||
},
|
||||
"build": {
|
||||
"appId": "com.liamcottle.reticulummeshchat",
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
16725
public/assets/js/vue@3.4.26/dist/vue.global.js
vendored
16725
public/assets/js/vue@3.4.26/dist/vue.global.js
vendored
File diff suppressed because it is too large
Load Diff
3430
public/index.html
3430
public/index.html
File diff suppressed because it is too large
Load Diff
3393
src/frontend/components/App.vue
Normal file
3393
src/frontend/components/App.vue
Normal file
File diff suppressed because it is too large
Load Diff
29
src/frontend/index.html
Normal file
29
src/frontend/index.html
Normal file
@@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title>Reticulum MeshChat</title>
|
||||
|
||||
<!-- scripts -->
|
||||
<script src="assets/js/tailwindcss/tailwind-v3.4.3-forms-v0.5.7.js"></script>
|
||||
<script src="assets/js/axios@1.6.8/dist/axios.min.js"></script>
|
||||
<script src="assets/js/vue@3.4.26/dist/vue.global.js"></script>
|
||||
<script src="assets/js/micron-parser.js"></script>
|
||||
|
||||
<!-- codec2 -->
|
||||
<script src="assets/js/codec2-emscripten/c2enc.js"></script>
|
||||
<script src="assets/js/codec2-emscripten/c2dec.js"></script>
|
||||
<script src="assets/js/codec2-emscripten/sox.js"></script>
|
||||
<script src="assets/js/codec2-emscripten/codec2-lib.js"></script>
|
||||
<script src="assets/js/codec2-emscripten/wav-encoder.js"></script>
|
||||
<script src="assets/js/codec2-emscripten/codec2-microphone-recorder.js"></script>
|
||||
|
||||
</head>
|
||||
<body class="bg-gray-100">
|
||||
<div id="app"></div>
|
||||
<script type="module" src="main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
5
src/frontend/main.js
Normal file
5
src/frontend/main.js
Normal file
@@ -0,0 +1,5 @@
|
||||
import { createApp } from 'vue';
|
||||
|
||||
import App from './components/App.vue';
|
||||
|
||||
createApp(App).mount('#app');
|
||||
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
27
vite.config.js
Normal file
27
vite.config.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import path from "path";
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
|
||||
export default {
|
||||
|
||||
plugins: [
|
||||
vue(),
|
||||
],
|
||||
|
||||
// vite app is loaded from /src/frontend
|
||||
root: path.join(__dirname, "src", "frontend"),
|
||||
|
||||
build: {
|
||||
|
||||
// we want to compile vite app to /public which is bundled and served by the python executable
|
||||
outDir: path.join(__dirname, "public"),
|
||||
emptyOutDir: true,
|
||||
|
||||
rollupOptions: {
|
||||
input: {
|
||||
// we want to use /src/frontend/index.html as the entrypoint for this vite app
|
||||
app: path.join(__dirname, "src", "frontend", "index.html"),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user