Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit abf1b28

Browse files
authored
refactor(perfermence): static SSR & mobile detect hooks (#1245)
* refactor(serve): test static-generate * refactor(serve): try static serve * chore(deploy): bump version to 2.1.0 * fix(mobile): performence issue caused by usePlatform hook * chore: bump version to v2.1.1 * fix(article): community change reload
1 parent 5ee69f6 commit abf1b28

File tree

81 files changed

+621
-3979
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+621
-3979
lines changed

config/config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"ICON_CMD": "https://assets.coderplanets.com/icons/cmd",
4949
"DEFAULT_ICON": "https://assets.coderplanets.com/icons/cmd/cheatsheet.svg",
5050
"DEFAULT_USER_AVATAR": "https://assets.coderplanets.com/icons/cmd/alien_user3.svg",
51-
"GRAPHQL_ENDPOINT": "https://api.coderplanets.com/graphiql",
51+
"GRAPHQL_ENDPOINT": "http://localhost:4001/graphiql",
5252
"SITE_URL": "https://coderplanets.com",
5353
"SITE_URL_SHORT": "https://coderplanets.com",
5454
"GITHUB": "https://github.com/coderplanets",
@@ -59,7 +59,7 @@
5959
"//--- contact configs ---//": "",
6060
"EMAIL_SUPPORT": "coderplanets@outlook.com",
6161
"// GRAPHQL_ENDPOINT": "https://api.coderplanets.com/graphiql",
62-
"BUILD_VERSION": "v2.0.99",
62+
"BUILD_VERSION": "v2.1.2",
6363
"// 1000 * 60 * 10 = 10 mins": "",
6464
"SSR_CACHE_TIME": 60000
6565
}

deploy/production/web.tar.gz

-34.4 KB
Binary file not shown.

package-lock.json

Lines changed: 27 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"local": "cross-env NODE_ENV=local node server",
99
"nextdev": "cross-env NODE_ENV=dev next dev",
1010
"nextstart": "next-boost",
11-
"nextstart2": "cross-env NODE_ENV=production next start",
11+
"nextstart2": "cross-env NODE_ENV=production next start -p 3000",
1212
"ci": "cross-env NODE_ENV=ci node server",
1313
"server": "npm run clean && node server.js",
1414
"build": "next build",
@@ -20,7 +20,8 @@
2020
"serve": "cross-env NODE_ENV=production next start -p ${SERVE_PORT}",
2121
"serve.dev": "cross-env NODE_ENV=dev SERVE_PORT=${SERVE_PORT} node server",
2222
"serve.prod.old": "cross-env NODE_ENV=production SERVE_PORT=${SERVE_PORT} node server",
23-
"serve.prod": "cross-env NODE_ENV=production next-boost -p ${SERVE_PORT}",
23+
"serve.prod.boost": "cross-env NODE_ENV=production next-boost -p ${SERVE_PORT}",
24+
"serve.prod": "cross-env NODE_ENV=production next start -p ${SERVE_PORT}",
2425
"dist": "next build && next export -o \"build\"",
2526
"start": "NODE_ENV=production node server.js",
2627
"clean": "shjs ./utils/scripts/clean.js",
@@ -101,6 +102,7 @@
101102
"react-calendar-heatmap": "1.8.1",
102103
"react-content-loader": "3.4.2",
103104
"react-copy-to-clipboard": "^5.0.3",
105+
"react-device-detect": "^2.1.2",
104106
"react-dom": "17.0.2",
105107
"react-highlight-words": "^0.16.0",
106108
"react-lazy-load-image-component": "1.5.0",

0 commit comments

Comments
 (0)