Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zzxming/vite-electron


https://github.com/zzxming/vite-electron

Last synced: about 2 months ago
JSON representation

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`