Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork0
jaywcjlove/react-native-doc
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
这里是本地离线预览React Native 官方文档的方法,解决因官网 CDN 资源导致无法打开官方文档网站,已经将处理好的 HTML 存放在gh-pages 分支,只需克隆配合sgo 工具预览即可。
Port:
60005-react-native-doc@jaywcjlove/docs/react-native
docker pull wcjiang/react-native:latest
Run Server
docker run --name react-native -p 60005:60005 --restart=always -d wcjiang/react-native:latest
# 克隆并下载带有 submodule 的项目git clone https://github.com/jaywcjlove/react-native-doc.git --depth=1 --recurse-submodules参数--recurse-submodules 会克隆太久react-native。
# 克隆项目git clone https://github.com/jaywcjlove/react-native-doc.git --depth=1# 初始化 submodule 子项目git submodule update --depth 1 --init --recursive# 更新 submodule 子项目git submodule update --recursive --remote
参数--depth 只有git@2.23.0-rc2 支持
npm install
通过下面命令批量替换 CDN 资源,运行之前确保react-native 目录下载完成,使用编辑器替换,内容太多会让编辑器卡死。替换内容在这里script/data.js
npm run start
更新 React Native 主文档仓库
# 进入 React Native 仓库cd react-native/# 放弃本地修改内容git reset --hardcd ../# 更新 submodule 子项目git submodule update --recursive --remote
npm run server虽然本地预览静态服务,但仍有很多链接是走CDN,通过运行脚本来替换
About
这里是本地离线预览 React Native 文档的方法,解决因官网 CDN 资源导致无法打开官方文档网站。
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.