diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index c8bff63..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "src/react-lazyload"] - path = src/react-lazyload - url = https://github.com/xmcp/react-lazyload diff --git a/README.md b/README.md index ccadf6e..8caf0bf 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,11 @@ ## 获取源码 -`git clone --recurse-submodules https://git.thu.monster/newthuhole/hole_thu_frontend.git` +`git clone https://git.thu.monster/newthuhole/hole_thu_frontend.git` -注意,由于改造自P大树洞网页版额,包含了由xmcp维护的submodule ## 部署 -推荐使用yarn - + 本地调试 ``` yarn install @@ -18,6 +15,7 @@ yarn start + 打包部署 ``` +export REACT_APP_BUILD_INFO="your version" yarn run build ``` diff --git a/package.json b/package.json index cfdc227..7d43456 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,8 @@ "react-timeago": "^4.4.0", "typescript": "^4.0.2", "workbox-sw": "^5.1.3", - "react-polls": "^1.2.0" + "react-polls": "^1.2.0", + "react-lazyload": "^3.2.0" }, "scripts": { "start": "react-scripts start", diff --git a/src/Flows.js b/src/Flows.js index 7cf933b..da5cfeb 100644 --- a/src/Flows.js +++ b/src/Flows.js @@ -11,7 +11,7 @@ import { HighlightedMarkdown, } from './Common'; import './Flows.css'; -import LazyLoad, { forceCheck } from './react-lazyload/src'; +import LazyLoad, { forceCheck } from 'react-lazyload'; import { TokenCtx, ReplyForm } from './UserAction'; import { API, parse_replies } from './flows_api'; import { cache } from './cache'; diff --git a/src/react-lazyload b/src/react-lazyload deleted file mode 160000 index 1b0c9e2..0000000 --- a/src/react-lazyload +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1b0c9e258df0897f37f8ef263bb4ca2719d50442 diff --git a/yarn.lock b/yarn.lock index e914648..bd5d32c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8792,6 +8792,11 @@ react-is@^16.8.1, react-is@^16.8.4: resolved "https://registry.npm.taobao.org/react-is/download/react-is-16.13.1.tgz?cache=0&sync_timestamp=1598612913326&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Freact-is%2Fdownload%2Freact-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha1-eJcppNw23imZ3BVt1sHZwYzqVqQ= +react-lazyload@^3.2.0: + version "3.2.0" + resolved "https://registry.npmmirror.com/react-lazyload/-/react-lazyload-3.2.0.tgz#497bd06a6dbd7015e3376e1137a67dc47d2dd021" + integrity sha512-zJlrG8QyVZz4+xkYZH5v1w3YaP5wEFaYSUWC4CT9UXfK75IfRAIEdnyIUF+dXr3kX2MOtL1lUaZmaQZqrETwgw== + react-polls@^1.2.0: version "1.2.0" resolved "https://registry.npmmirror.com/react-polls/download/react-polls-1.2.0.tgz#4d2e9802efe7e83ee8b37ae3d1368f7bf7869675"