Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2a0d022

Browse files
author
Ornithopter-pilot
committed
Added npm and yarn package commands to create distributables
1 parent 945bb15 commit 2a0d022

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,30 @@ chmod +x stealth-run.sh
135135

136136
**IMPORTANT**: The application window will be invisible by default! Use Ctrl+B (or Cmd+B on Mac) to toggle visibility.
137137

138+
### Building Distributable Packages
139+
140+
To create installable packages for distribution:
141+
142+
**For macOS (DMG):**
143+
```bash
144+
# Using npm
145+
npm run package-mac
146+
147+
# Or using yarn
148+
yarn package-mac
149+
```
150+
151+
**For Windows (Installer):**
152+
```bash
153+
# Using npm
154+
npm run package-win
155+
156+
# Or using yarn
157+
yarn package-win
158+
```
159+
160+
The packaged applications will be available in the `release` directory.
161+
138162
**What the scripts do:**
139163
- Create necessary directories for the application
140164
- Clean previous builds to ensure a fresh start

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
"dev": "cross-env NODE_ENV=development npm run clean && concurrently \"tsc -w -p tsconfig.electron.json\" \"vite\" \"wait-on -t 30000 http://localhost:54321 && electron ./dist-electron/main.js\"",
88
"start": "cross-env NODE_ENV=development concurrently \"tsc -p tsconfig.electron.json\" \"vite\" \"wait-on -t 30000 http://localhost:54321 && electron ./dist-electron/main.js\"",
99
"build": "cross-env NODE_ENV=production rimraf dist dist-electron && vite build && tsc -p tsconfig.electron.json",
10-
"run-prod": "cross-env NODE_ENV=production electron ./dist-electron/main.js"
10+
"run-prod": "cross-env NODE_ENV=production electron ./dist-electron/main.js",
11+
"package": "yarn build && electron-builder build",
12+
"package-mac": "yarn build && electron-builder build --mac",
13+
"package-win": "yarn build && electron-builder build --win"
1114
},
1215
"build": {
1316
"appId": "com.chunginlee.interviewcoder",

0 commit comments

Comments
 (0)