{"id":27192227,"url":"https://github.com/imactool/electron-demo","last_synced_at":"2025-04-09T18:44:12.098Z","repository":{"id":188450956,"uuid":"678723959","full_name":"iMactool/electron-demo","owner":"iMactool","description":"electron-demo","archived":false,"fork":false,"pushed_at":"2023-08-15T10:31:45.000Z","size":320,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-08-15T11:58:40.089Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iMactool.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-08-15T08:12:17.000Z","updated_at":"2023-08-15T11:59:20.381Z","dependencies_parsed_at":"2023-08-15T12:09:48.001Z","dependency_job_id":null,"html_url":"https://github.com/iMactool/electron-demo","commit_stats":null,"previous_names":["imactool/electron-demo"],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMactool%2Felectron-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMactool%2Felectron-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMactool%2Felectron-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMactool%2Felectron-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iMactool","download_url":"https://codeload.github.com/iMactool/electron-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248090725,"owners_count":21046139,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-09T18:44:11.387Z","updated_at":"2025-04-09T18:44:12.086Z","avatar_url":"https://github.com/iMactool.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"README.md\n\n最快捷的打包方式是使用 Electron Forge。\n\n```\nyarn add --dev @electron-forge/cli\nnpx electron-forge import\n```\n\n使用 Forge 的 make 命令来创建可分发的应用程序：\n\n```\nyarn make\n```\n\n通过检查 Node.js 的 process.platform 变量，您可以针对特定平台运行特定代码。 请注意，Electron 目前只支持三个平台：win32 (Windows), linux (Linux) 和 darwin (macOS) 。\n\n### 使用 VS Code 调试\n\n如果您希望使用 VS Code 调试您的程序，您需要让 VS Code 监听主进程 (main process) 和渲染器进程 (renderer process) 。 下面为您提供了一个简单的配置文件。 请在根目录新建一个 .vscode 文件夹，然后在其中新建一个 launch.json 配置文件并填写如下内容。\n\n`.vscode/launch.json` 文件内容\n\n```\n{\n  \"version\": \"0.2.0\",\n  \"compounds\": [\n    {\n      \"name\": \"Main + renderer\",\n      \"configurations\": [\"Main\", \"Renderer\"],\n      \"stopAll\": true\n    }\n  ],\n  \"configurations\": [\n    {\n      \"name\": \"Renderer\",\n      \"port\": 9222,\n      \"request\": \"attach\",\n      \"type\": \"chrome\",\n      \"webRoot\": \"${workspaceFolder}\"\n    },\n    {\n      \"name\": \"Main\",\n      \"type\": \"node\",\n      \"request\": \"launch\",\n      \"cwd\": \"${workspaceFolder}\",\n      \"runtimeExecutable\": \"${workspaceFolder}/node_modules/.bin/electron\",\n      \"windows\": {\n        \"runtimeExecutable\": \"${workspaceFolder}/node_modules/.bin/electron.cmd\"\n      },\n      \"args\": [\".\", \"--remote-debugging-port=9222\"],\n      \"outputCapture\": \"std\",\n      \"console\": \"integratedTerminal\"\n    }\n  ]\n}\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimactool%2Felectron-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimactool%2Felectron-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimactool%2Felectron-demo/lists"}