It is too slow for the external Internet to access the official document websites of the component library and React. The solution is to clone them to the local preview site, so that the preview can be offline and fast.

This is a little tip to share with you, and the documents are filed here.

Installing the Preview Tool

Clone the document to the local, through the SGO tool preview local various documents.

npm install -g sgo # installation sgo
sgo --fallback index.html Create a static service and preview the site
Copy the code

Document web site

Share the documentation site cloning addresses of several tools below

React

git clone https://github.com/reactjs/zh-hans.reactjs.org.git --depth 1 -b gh-pages
cd zh-hans.reactjs.org # enter directory
sgo --fallback index.html Create a static service and preview the site
Copy the code

Vue

git clone https://github.com/vuejs/cn.vuejs.org.git --depth 1 -b gh-pages
Copy the code

Component library documentation site

Ant Design

git clone https://github.com/ant-design/ant-design.git --depth 1 -b gh-pages
# or Gitee
git clone https://gitee.com/ant-design/ant-design.git --depth 1 -b gh-pages
Copy the code

Ant Design Pro

git clone https://github.com/ant-design/ant-design-pro.git --depth 1 -b gh-pages
# or Gitee
git clone https://gitee.com/ant-design/ant-design-pro-site.git --depth 1 -b master
Copy the code

UIW

git clone https://github.com/uiwjs/uiwjs.github.io.git --depth 1 -b master
# or Gitee
git clone https://gitee.com/uiw/uiw.git --depth 1 -b gh-pages
Copy the code

Element

# Vue version
git clone https://github.com/ElemeFE/element.git --depth 1 -b gh-pages
# the React version
git clone https://github.com/ElemeFE/element-react.git --depth 1 -b gh-pages
Copy the code

The background

Sequelize

git clone https://github.com/sequelize/sequelize.org.git --depth 1 -b gh-pages
cd sequelize.org # enter directory
sgo -d v4 Create Sequelize@v4 version static service
sgo -d v3 Create Sequelize@v3 version static service
Copy the code

Koa

git clone https://github.com/koajs/koajs.com.git --depth 1 -b gh-pages
open index.html You don't need to use the sGO tool, just open index.html in your browser
Copy the code