Skip to content

Commit 2243366

Browse files
committed
v0.0.0
0 parents  commit 2243366

25 files changed

Lines changed: 5098 additions & 0 deletions
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Build and Release # 워크플로우 이름
2+
3+
on: # 트리거 설정
4+
push: # push 이벤트 중
5+
tags: # 태그에만 반응
6+
- 'v*.*.*' # v1.0.0, v2.3.4 같은 태그 푸시 시 실행
7+
8+
permissions:
9+
contents: write # 릴리스 업로드 권한 (GH Release에 파일 올리려면 필요)
10+
11+
jobs:
12+
build-win: # 윈도우용 빌드 잡
13+
runs-on: windows-latest # 윈도우 러너에서 실행 (윈도우 설치파일은 윈도우에서만 빌드 가능)
14+
15+
env:
16+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # electron-builder가 릴리스 업로드에 쓰는 토큰 이름 (필수)
17+
18+
steps:
19+
- name: Checkout # 저장소 체크아웃
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0 # 태그/버전 정보까지 필요하니 얕은 체크아웃 금지
23+
24+
- name: Show repo structure # 디렉터리 구조 확인 로그 (문제 생기면 디버그에 도움)
25+
run: |
26+
echo "::group::Repo root"
27+
dir
28+
echo "::endgroup::"
29+
30+
- name: Setup Node.js # Node 세팅
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: 20 # LTS 권장 (22는 전이슈 리스크)
34+
cache: npm # npm 캐시 활성화
35+
cache-dependency-path: package-lock.json # 캐시 키 기준 파일
36+
37+
- name: Install dependencies # 의존성 설치
38+
run: npm ci # CI에 맞는 고정 설치
39+
40+
- name: Build web (Vite) # 프론트 빌드: dist/ 생성
41+
run: npm run build # vite build 실행 (vite.config.js 기준)
42+
43+
- name: Build desktop (electron-builder) # Electron 앱 패키징
44+
run: npx electron-builder --win nsis portable
45+
# --win: 윈도우 타깃
46+
# nsis: 설치형(.exe 인스톨러)
47+
# portable: 포터블(.exe 단일 실행파일)도 함께 빌드
48+
# 결과물은 기본적으로 release/ 폴더에 생성 (package.json build.directories.output에 따라 다름)
49+
50+
- name: Upload artifacts # 빌드 산출물 아티팩트 업로드 (CI에서 다운로드용)
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: windows-artifacts # 아티팩트 표시 이름
54+
path: release/** # 릴리스 결과물 경로(기본값이 release/인 경우)
55+
56+
- name: Create GitHub Release # GitHub Release 생성 및 파일 첨부
57+
uses: softprops/action-gh-release@v2
58+
with:
59+
draft: true # 초안으로 만들어 수동 공개 가능
60+
files: |
61+
release/**

.gitignore

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
.DS_Store
12+
dist
13+
dist-ssr
14+
coverage
15+
*.local
16+
17+
/cypress/videos/
18+
/cypress/screenshots/
19+
20+
# Editor directories and files
21+
.vscode/*
22+
!.vscode/extensions.json
23+
.idea
24+
*.suo
25+
*.ntvs*
26+
*.njsproj
27+
*.sln
28+
*.sw?
29+
30+
*.tsbuildinfo

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["Vue.volar"]
3+
}

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# vue-project
2+
3+
This template should help get you started developing with Vue 3 in Vite.
4+
5+
## Recommended IDE Setup
6+
7+
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
8+
9+
## Customize configuration
10+
11+
See [Vite Configuration Reference](https://vite.dev/config/).
12+
13+
## Project Setup
14+
15+
```sh
16+
npm install
17+
```
18+
19+
### Compile and Hot-Reload for Development
20+
21+
```sh
22+
npm run dev
23+
```
24+
25+
### Compile and Minify for Production
26+
27+
```sh
28+
npm run build
29+
```

index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html lang="">
3+
<head>
4+
<meta charset="UTF-8">
5+
<link rel="icon" href="/favicon.ico">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>Vite App</title>
8+
</head>
9+
<body>
10+
<div id="app"></div>
11+
<script type="module" src="/src/main.js"></script>
12+
</body>
13+
</html>

jsconfig.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"compilerOptions": {
3+
"paths": {
4+
"@/*": ["./src/*"]
5+
}
6+
},
7+
"exclude": ["node_modules", "dist"]
8+
}

main.cjs

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
const { app, BrowserWindow, shell } = require('electron');
2+
const path = require('path');
3+
4+
const isDev = !app.isPackaged;
5+
const RENDERER_URL = process.env.RENDERER_URL || 'http://localhost:5173';
6+
7+
let win;
8+
9+
function createWindow() {
10+
console.log('[main] isDev =', isDev, 'RENDERER_URL =', RENDERER_URL);
11+
12+
win = new BrowserWindow({
13+
width: 1280,
14+
height: 800,
15+
webPreferences: {
16+
contextIsolation: true,
17+
nodeIntegration: false,
18+
preload: path.join(__dirname, 'preload.cjs'),
19+
sandbox: false
20+
}
21+
});
22+
23+
// 로드 상태 전부 찍기
24+
win.webContents.on('did-start-loading', () => console.log('[main] did-start-loading'));
25+
win.webContents.on('did-stop-loading', () => console.log('[main] did-stop-loading'));
26+
win.webContents.on('did-finish-load', () => console.log('[main] did-finish-load'));
27+
win.webContents.on('did-fail-load', (e, code, desc, url) => {
28+
console.error('[main] did-fail-load', { code, desc, url });
29+
});
30+
win.webContents.on('console-message', (e, level, message) => {
31+
console.log('[renderer]', level, message);
32+
});
33+
34+
if (isDev) {
35+
win.loadURL(RENDERER_URL); // Vite dev 서버
36+
win.webContents.openDevTools({ mode: 'detach' });
37+
} else {
38+
const indexPath = path.join(process.resourcesPath, 'app', 'dist', 'index.html');
39+
win.loadFile(indexPath);
40+
}
41+
42+
win.webContents.setWindowOpenHandler(({ url }) => { shell.openExternal(url); return { action: 'deny' }; });
43+
}
44+
45+
app.whenReady().then(createWindow);
46+
app.on('window-all-closed', () => { if (process.platform !== 'darwin') app.quit(); });
47+
app.on('activate', () => { if (BrowserWindow.getAllWindows().length === 0) createWindow(); });

0 commit comments

Comments
 (0)