-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (24 loc) · 802 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
.PHONY: all bundle_main main preload renderer pack release preview clean publish publish_pack
DIST := ./dist
MAIN_DIST := $(DIST)/main
PRELOAD_DIST := $(DIST)/preload
all: release
bundle_main:
mkdir -p $(MAIN_DIST)
cp -rf src/main/* $(MAIN_DIST)/
preload:
mkdir -p $(PRELOAD_DIST)
cp -rf src/preload/* $(PRELOAD_DIST)/
renderer:
npx vite build
pack:
npx electron-builder build --config electron-builder.config.js --dir
release: renderer preload bundle_main
publish: renderer preload bundle_main
npx electron-builder build --config electron-builder.config.js --dir --publish 'never'
publish_pack: release
NODE_ENV=pre npx --no-install electron-builder --config electron-builder.config.js --publish 'never'
preview:
npx electron $(MAIN_DIST)/main.js
clean:
rm -rf $(DIST)/* out/*