Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zzxming/vite-electron
https://github.com/zzxming/vite-electron
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/zzxming/vite-electron
- Owner: zzxming
- License: mit
- Created: 2024-10-17T10:10:25.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-10-28T02:03:37.000Z (2 months ago)
- Last Synced: 2024-10-28T05:58:08.045Z (2 months ago)
- Language: TypeScript
- Size: 349 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## start
Please replace the corresponding path in the following file
```sh
# .env
# server host
VITE_SERVER_HOST=http://localhost:3000
``````ts
// scripts/build.ts// new version vertify path. default /updater
buildConfig.publish = [
{
provider: 'generic',
url: `${process.env.VITE_SERVER_HOST}/updater`,
},
];
// new version package download path. default use pakcage name
latestConfig.path = `${process.env.VITE_SERVER_HOST}/${pkgInfo.name}/${latestConfig.path}`;
```run command to start electron app
```bash
pnpm i
pnpm build:common
pnpm dev
```## build
The project is packaged using `electron-builder`. The following command will package the installation packages for window / mac and Linux
Before each packaging, it is necessary to modify `config/lease.log.json`
If you want to add other packaging parameters, please modify the `platformMap` in `scripts/build.ts`
```bash
pnpm build:electron win linux mac
```## update
Create a file named `dev-update.yml` in the `config` folder. The content structure is consistent with the packaged product `latest.yml`
If there is no `dev-update.yml` file, no update check will be performed
### full update
In development mode, full updates will be checked based on the fields of dev-updatey.yml
### increase update
Incremental update check based on the `releaseDate` field in `package.json`