mirror of
https://github.com/ivabus/gui
synced 2025-06-07 15:50:27 +03:00
#186 fix vite build for electron main
This commit is contained in:
parent
68602cbea3
commit
61ecc1ed42
4 changed files with 9 additions and 3 deletions
|
@ -39,6 +39,7 @@ pnpm dev
|
||||||
### dist
|
### dist
|
||||||
```sh
|
```sh
|
||||||
pnpm install
|
pnpm install
|
||||||
|
pnpm add -g vite
|
||||||
pnpm --filter desktop exec pnpm dist
|
pnpm --filter desktop exec pnpm dist
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,17 @@ import { mkdirp } from 'mkdirp';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import { getTeaPath } from './teaDir';
|
import { getTeaPath } from './teaDir';
|
||||||
import type { Session } from '../../src/libs/types';
|
|
||||||
import * as v1Client from './v1Client';
|
import * as v1Client from './v1Client';
|
||||||
|
|
||||||
const sessionFilePath = path.join(getTeaPath(), 'tea.xyz/gui/tmp.dat');
|
const sessionFilePath = path.join(getTeaPath(), 'tea.xyz/gui/tmp.dat');
|
||||||
const sessionFolder = path.join(getTeaPath(), 'tea.xyz/gui');
|
const sessionFolder = path.join(getTeaPath(), 'tea.xyz/gui');
|
||||||
|
|
||||||
|
interface Session {
|
||||||
|
device_id?: string;
|
||||||
|
key?: string;
|
||||||
|
user?: any;
|
||||||
|
}
|
||||||
|
|
||||||
export async function initSessionData() {
|
export async function initSessionData() {
|
||||||
fs.readFileSync(sessionFilePath);
|
fs.readFileSync(sessionFilePath);
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
"dev:all": "concurrently -n=svelte,electron -c='#ff3e00',blue \"pnpm dev:main\" \"pnpm dev:svelte\" \"pnpm dev:electron\"",
|
"dev:all": "concurrently -n=svelte,electron -c='#ff3e00',blue \"pnpm dev:main\" \"pnpm dev:svelte\" \"pnpm dev:electron\"",
|
||||||
"dev:svelte": "vite dev",
|
"dev:svelte": "vite dev",
|
||||||
"dev:electron": "electron electron/dist/electron.cjs",
|
"dev:electron": "electron electron/dist/electron.cjs",
|
||||||
"dev:main": "cd ./electron && pnpm vite build --watch",
|
"dev:main": "cd ./electron && vite build --config ./vite.config.js --watch",
|
||||||
"build:main": "cd ./electron && pnpm vite build",
|
"build:main": "cd ./electron && vite --config ./vite.config.js build --base .",
|
||||||
"pack": "electron-builder --dir --config electron-builder.config.cjs",
|
"pack": "electron-builder --dir --config electron-builder.config.cjs",
|
||||||
"dist": "pnpm build && electron-builder --config electron-builder.config.cjs",
|
"dist": "pnpm build && electron-builder --config electron-builder.config.cjs",
|
||||||
"package": "pnpm build && electron-builder --config electron-builder.config.cjs",
|
"package": "pnpm build && electron-builder --config electron-builder.config.cjs",
|
||||||
|
|
Loading…
Reference in a new issue