{"id":20738761,"url":"https://github.com/wyyxdgm/electron-react-app","last_synced_at":"2026-04-29T21:06:30.194Z","repository":{"id":97168890,"uuid":"313054260","full_name":"wyyxdgm/electron-react-app","owner":"wyyxdgm","description":"electron react app","archived":false,"fork":false,"pushed_at":"2020-12-05T06:28:43.000Z","size":2717,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-08T12:46:01.079Z","etag":null,"topics":["antd","debug","electron","electron-log","electron-react","electron-store","independent-development-mode","react","react-app","react-devtools","typescript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wyyxdgm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-15T14:53:23.000Z","updated_at":"2020-12-05T06:28:45.000Z","dependencies_parsed_at":"2023-05-01T06:01:09.903Z","dependency_job_id":null,"html_url":"https://github.com/wyyxdgm/electron-react-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/wyyxdgm/electron-react-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wyyxdgm%2Felectron-react-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wyyxdgm%2Felectron-react-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wyyxdgm%2Felectron-react-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wyyxdgm%2Felectron-react-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wyyxdgm","download_url":"https://codeload.github.com/wyyxdgm/electron-react-app/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wyyxdgm%2Felectron-react-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32443618,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T20:22:27.477Z","status":"ssl_error","status_checked_at":"2026-04-29T20:22:26.507Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["antd","debug","electron","electron-log","electron-react","electron-store","independent-development-mode","react","react-app","react-devtools","typescript"],"created_at":"2024-11-17T06:20:28.338Z","updated_at":"2026-04-29T21:06:30.161Z","avatar_url":"https://github.com/wyyxdgm.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# electron-react-app\n\n![](icons/app.png)\n\n整合`react-app`和`electron`的独立开发模式\n\n- [环境要求](#环境要求)\n- [开发\u0026打包](#开发相关)\n- [项目概要](#项目概要)\n\n## 环境要求\n\n### 版本\n\nnode: `v12.18.1`\nnpm: `6.14.8`\nyarn: `1.22.4`\nelectron-forge: `6.0.0-beta.54`\n\n### 全局依赖安装\n\n- [node](https://nodejs.org/en/)\n- [yarn](https://yarn.bootcss.com/docs/install/#mac-stable)\n- [electron](https://www.electronforge.io/)\n\n## 开发相关\n\n### 初始化\n\n```bash\nyarn binit\n```\n\n### 本地开发\n\n```bash\nyarn bstart\n```\n\n### 打包\u0026\u0026编译应用\n\n```bash\nyarn bmake\n```\n\n## 项目概要\n\n### electron初始化\n\n```bash\nyarn create electron-app electron-react-app\n```\n\n### react初始化\n\n```bash\nyarn create react-app react-app --template typescript\ncd react-app\nyarn add antd\nyarn start\n```\n\n### 更改react打包路径\n\n默认生成目标路径为`react-app/build`，调整为`src/view`，(配置文件`react-app/config/paths.js`)\n\n相关代码：\n\n```js\n{\n  appBuild: resolveApp('../src/view'),\n}\n```\n\n### 启动浏览器替换成启动electron\n\n通过修改`react-app/scripts/start.js`添加`startElectron`变量，决定否同步启动`electron`\n\n相关代码：\n\n```js\nrequire(\"child_process\").spawn(\"yarn\", [\"startElectron\"]);\n```\n\n### 系统引入其他支持\n\n- 数据存储：使用`electron-store`进行数据持久化\n- 志打印：使用`electron-log`打印日志\n- 调试主线程: 可使用`vscode`调试主线程\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwyyxdgm%2Felectron-react-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwyyxdgm%2Felectron-react-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwyyxdgm%2Felectron-react-app/lists"}