{"id":15679948,"url":"https://github.com/jaywcjlove/react-native-doc","last_synced_at":"2026-03-07T21:31:05.711Z","repository":{"id":49732850,"uuid":"202174684","full_name":"jaywcjlove/react-native-doc","owner":"jaywcjlove","description":"这里是本地离线预览 React Native 文档的方法，解决因官网 CDN 资源导致无法打开官方文档网站。","archived":false,"fork":false,"pushed_at":"2023-12-15T08:47:27.000Z","size":79350,"stargazers_count":11,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-26T18:40:45.662Z","etag":null,"topics":["document","react-native","reactjs"],"latest_commit_sha":null,"homepage":"","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/jaywcjlove.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":["jaywcjlove"],"custom":"https://jaywcjlove.github.io/sponsor.html"}},"created_at":"2019-08-13T15:36:00.000Z","updated_at":"2021-03-01T03:22:16.000Z","dependencies_parsed_at":"2023-12-20T14:13:18.165Z","dependency_job_id":"e5425f5c-b762-431d-b546-f79a9a8d5ace","html_url":"https://github.com/jaywcjlove/react-native-doc","commit_stats":{"total_commits":47,"total_committers":3,"mean_commits":"15.666666666666666","dds":0.04255319148936165,"last_synced_commit":"7bbd947d662efe5d9f5d8f6955e8079ffd38fe80"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jaywcjlove/react-native-doc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaywcjlove%2Freact-native-doc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaywcjlove%2Freact-native-doc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaywcjlove%2Freact-native-doc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaywcjlove%2Freact-native-doc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaywcjlove","download_url":"https://codeload.github.com/jaywcjlove/react-native-doc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaywcjlove%2Freact-native-doc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30231597,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T19:01:10.287Z","status":"ssl_error","status_checked_at":"2026-03-07T18:59:58.103Z","response_time":53,"last_error":"SSL_read: 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":["document","react-native","reactjs"],"created_at":"2024-10-03T16:39:18.364Z","updated_at":"2026-03-07T21:31:04.313Z","avatar_url":"https://github.com/jaywcjlove.png","language":"JavaScript","funding_links":["https://github.com/sponsors/jaywcjlove","https://jaywcjlove.github.io/sponsor.html"],"categories":["JavaScript"],"sub_categories":[],"readme":"React Native Doc\n===\n\n![Build and Deploy react-native-doc](https://github.com/jaywcjlove/react-native-doc/workflows/Build%20and%20Deploy%20react-native-doc/badge.svg) [![Docker Image Version (latest by date)](https://img.shields.io/docker/v/wcjiang/react-native?label=@wcjiang/react-native)](https://hub.docker.com/r/wcjiang/react-native) [![Docker Stars](https://img.shields.io/docker/stars/wcjiang/react-native)](https://hub.docker.com/r/wcjiang/react-native) \n\n这里是本地离线预览 [React Native](https://github.com/facebook/react-native/) 官方文档的方法，解决因官网 CDN 资源导致无法打开官方文档网站，已经将处理好的 HTML 存放在 [gh-pages](https://github.com/jaywcjlove/react-native-doc/tree/gh-pages) 分支，只需克隆配合 [sgo](https://github.com/jaywcjlove/sgo) 工具预览即可。\n\n## Docker 部署\n\n\u003e Port: `60005` - [react-native-doc](https://facebook.github.io/react-native/) [@jaywcjlove/docs/react-native](https://github.com/jaywcjlove/docs)\n\n```shell\ndocker pull wcjiang/react-native:latest\n```\n\nRun Server\n\n```shell\ndocker run --name react-native -p 60005:60005 --restart=always -d wcjiang/react-native:latest\n```\n\n## 下载工程\n\n```bash\n# 克隆并下载带有 submodule 的项目\ngit clone https://github.com/jaywcjlove/react-native-doc.git --depth=1 --recurse-submodules\n```\n\n参数 `--recurse-submodules` 会克隆太久 `react-native`。\n\n```bash\n# 克隆项目\ngit clone https://github.com/jaywcjlove/react-native-doc.git --depth=1\n# 初始化 submodule 子项目\ngit submodule update --depth 1 --init --recursive\n# 更新 submodule 子项目\ngit submodule update --recursive --remote\n```\n\n参数 `--depth` 只有 [git@2.23.0-rc2](https://github.com/git/git/commit/275cd184d52b5b81cb89e4ec33e540fb2ae61c1f) 支持\n\n## 安装依赖\n\n```bash\nnpm install\n```\n\n## 替换 CDN 资源\n\n通过下面命令批量替换 CDN 资源，运行之前确保 `react-native` 目录下载完成，使用编辑器替换，内容太多会让编辑器卡死。替换内容在这里 [`script/data.js`](script/data.js)\n\n```bash\nnpm run start\n```\n\n更新 React Native 主文档仓库\n\n```bash\n# 进入 React Native 仓库\ncd react-native/\n# 放弃本地修改内容\ngit reset --hard\ncd ../\n# 更新 submodule 子项目\ngit submodule update --recursive --remote\n```\n\n## 启动服务\n\n```\nnpm run server\n```\n\n## 注意\n\n虽然本地预览静态服务，但仍有很多链接是走 `CDN`，通过运行脚本来替换\n\n## Links\n\n- [@jaywcjlove/docs](https://github.com/jaywcjlove/docs)\n- [@jaywcjlove/react-native-doc](https://github.com/jaywcjlove/react-native-doc)\n- [Docker Repository.](https://hub.docker.com/r/wcjiang/react-native)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaywcjlove%2Freact-native-doc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaywcjlove%2Freact-native-doc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaywcjlove%2Freact-native-doc/lists"}