diff --git a/.gitignore b/.gitignore index a193f72..8963e47 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,8 @@ +### VS Code +.vscode/* +!.vscode/tasks.json +!.vscode/extensions.json + ### IntelliJ .idea/ *.iml diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..9a62185 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,28 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "앱 실행", + "type": "shell", + "command": "npm start", + "group": { + "kind": "build", + "isDefault": true + }, + "presentation": { + "reveal": "always", + "panel": "shared" + } + }, + { + "label": "앱 실행 (디버그)", + "type": "shell", + "command": "npm run debug", + "group": "build", + "presentation": { + "reveal": "always", + "panel": "shared" + } + } + ] +} diff --git a/package-lock.json b/package-lock.json index 9409d4b..c511a16 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "photo-renamer", "version": "2.0.0", "devDependencies": { + "cross-env": "^10.1.0", "electron": "^28.0.0", "electron-builder": "^24.9.1" } @@ -303,6 +304,13 @@ "node": ">= 10.0.0" } }, + "node_modules/@epic-web/invariant": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@epic-web/invariant/-/invariant-1.0.0.tgz", + "integrity": "sha512-lrTPqgvfFQtR/eY/qkIzp98OGdNJu0m5ji3q/nJI8v3SXkRKEnWiOxMmbvcSoAIzv/cGiuvRy57k4suKQSAdwA==", + "dev": true, + "license": "MIT" + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -1496,6 +1504,24 @@ "node": ">= 10" } }, + "node_modules/cross-env": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-10.1.0.tgz", + "integrity": "sha512-GsYosgnACZTADcmEyJctkJIoqAhHjttw7RsFrVoJNXbsWWqaq6Ym+7kZjq6mS45O0jij6vtiReppKQEtqWy6Dw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@epic-web/invariant": "^1.0.0", + "cross-spawn": "^7.0.6" + }, + "bin": { + "cross-env": "dist/bin/cross-env.js", + "cross-env-shell": "dist/bin/cross-env-shell.js" + }, + "engines": { + "node": ">=20" + } + }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", diff --git a/package.json b/package.json index 79f8641..0793aa7 100644 --- a/package.json +++ b/package.json @@ -4,19 +4,46 @@ "description": "사진 파일 이름 정리 앱", "main": "src/main/index.js", "scripts": { - "start": "NODE_ENV=development electron .", - "debug": "NODE_ENV=development electron --inspect=9229 --remote-debugging-port=9222 . 2>&1 | tee debug.log", - "build": "NODE_ENV=production electron-builder --mac --dir", - "dist": "NODE_ENV=production electron-builder --mac" + "start": "cross-env NODE_ENV=development electron .", + "debug": "cross-env NODE_ENV=development electron --inspect=9229 --remote-debugging-port=9222 .", + "build": "cross-env NODE_ENV=production electron-builder --win --dir", + "dist": "cross-env NODE_ENV=production electron-builder --win", + "build:mac": "cross-env NODE_ENV=production electron-builder --mac --dir", + "dist:mac": "cross-env NODE_ENV=production electron-builder --mac" }, "build": { "appId": "com.photorenamer.app", "productName": "Photo Renamer", + "win": { + "icon": "assets/icon.png", + "target": [ + { + "target": "nsis", + "arch": [ + "x64" + ] + } + ] + }, + "nsis": { + "oneClick": false, + "allowToChangeInstallationDirectory": true, + "installerIcon": "assets/icon.png", + "uninstallerIcon": "assets/icon.png", + "createDesktopShortcut": true, + "createStartMenuShortcut": true + }, "mac": { "category": "public.app-category.photography", "icon": "assets/icon.icns", "target": [ - { "target": "dmg", "arch": ["arm64", "x64"] } + { + "target": "dmg", + "arch": [ + "arm64", + "x64" + ] + } ] }, "files": [ @@ -26,6 +53,7 @@ ] }, "devDependencies": { + "cross-env": "^10.1.0", "electron": "^28.0.0", "electron-builder": "^24.9.1" }