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

Commit 7085919

Browse files
committed
feat: 修改renderLayout 实现方式
1 parent ef5323a commit 7085919

File tree

22 files changed

+89
-77
lines changed

22 files changed

+89
-77
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ jobs:
2020
- v1-ssr-{{ .Branch }}-{{ checksum "package.json" }}
2121
- v1-ssr-{{ .Branch }}-
2222
- v1-ssr-
23-
# install chromedriver module
2423
- run:
2524
command: |
2625
npm install --registry=https://registry.npm.taobao.org/
@@ -64,6 +63,7 @@ jobs:
6463
at: ~/project
6564
- run:
6665
command: |
66+
# install chromedriver module
6767
sudo apt-get install libnss3-dev
6868
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
6969
echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' | sudo tee /etc/apt/sources.list.d/google-chrome.list

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,5 @@ tests_output
7878
bin
7979

8080
package-lock.json
81+
82+
dist

example/ssr-with-antd/app/controller/page.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
const Controller = require('egg').Controller
3-
const { renderToStream } = require('ykfe-utils')
3+
const renderToStream = require('ykfe-utils/lib/renderToStream')
44
const ssrConfig = require('../../config/config.ssr')
55

66
class PageController extends Controller {

example/ssr-with-dva/app/controller/page.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
const Controller = require('egg').Controller
3-
const { renderToStream } = require('ykfe-utils')
3+
const renderToStream = require('ykfe-utils/lib/renderToStream')
44
const ssrConfig = require('../../config/config.ssr')
55

66
class PageController extends Controller {

example/ssr-with-js/app/controller/page.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
const Controller = require('egg').Controller
3-
const { renderToStream } = require('ykfe-utils')
3+
const renderToStream = require('ykfe-utils/lib/renderToStream')
44
const ssrConfig = require('../../config/config.ssr')
55

66
class PageController extends Controller {

example/ssr-with-js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"react-dev-utils": "^8.0.0",
1111
"react-dom": "16.8.3",
1212
"react-router-dom": "^5.0.0",
13-
"yk-cli": "^2.4.0",
13+
"yk-cli": "^2.6.1",
1414
"ykfe-utils": "^2.0.2"
1515
},
1616
"scripts": {

example/ssr-with-loadable/app/controller/page.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
const Controller = require('egg').Controller
3-
const { renderToStream } = require('ykfe-utils')
3+
const renderToStream = require('ykfe-utils/lib/renderToStream')
44
const ssrConfig = require('../../config/config.ssr')
55

66
class PageController extends Controller {

example/ssr-with-mobx/app/controller/page.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
const Controller = require('egg').Controller
3-
const { renderToStream } = require('ykfe-utils')
3+
const renderToStream = require('ykfe-utils/lib/renderToStream')
44
const ssrConfig = require('../../config/config.ssr')
55

66
class PageController extends Controller {

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"test": "node ./test/scripts/preInstall.js && npm run test:unit && npm run test:coverage && npm run test:e2e",
1414
"test:coverage": "codecov",
1515
"test:unit": "NODE_ENV=test jest --coverage",
16-
"test:e2e": "NODE_ENV=development node ./test/e2e/startServer.js",
16+
"test:e2e": "NODE_ENV=production node ./test/e2e/startServer.js",
1717
"docs:dev": "vuepress dev docs",
1818
"docs:build": "vuepress build docs && npm run publish",
1919
"publish": "surge ./docs/.vuepress/dist ykfe.surge.sh --domain ykfe.net"
@@ -30,7 +30,9 @@
3030
"pre-commit": [
3131
"lint"
3232
],
33-
"publishConfig": { "registry": "https://npm.pkg.github.com/" },
33+
"publishConfig": {
34+
"registry": "https://npm.pkg.github.com/"
35+
},
3436
"engines": {
3537
"node": ">=8"
3638
},
@@ -75,5 +77,6 @@
7577
"tslint-config-standard": "^8.0.1",
7678
"typescript": "^3.5.3",
7779
"vuepress": "^0.14.8"
78-
}
80+
},
81+
"dependencies": {}
7982
}

packages/yk-cli/package.json

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "yk-cli",
3-
"version": "2.5.4",
3+
"version": "2.6.1",
44
"description": "ykcli for ssr",
55
"main": "./bin/index.js",
66
"types": "types/index.d.ts",
@@ -17,37 +17,27 @@
1717
"url": "git+https://github.com/ykfe/yk-cli.git"
1818
},
1919
"dependencies": {
20-
"@babel/core": "^7.5.5",
21-
"@babel/plugin-transform-runtime": "^7.5.5",
22-
"@babel/preset-env": "^7.5.5",
23-
"@babel/preset-react": "^7.0.0",
24-
"@babel/register": "^7.5.5",
25-
"@babel/runtime": "^7.5.5",
26-
"babel-plugin-module-resolver": "^3.2.0",
27-
"babel-plugin-transform-define": "^1.3.1",
2820
"download-git-repo": "^2.0.0",
2921
"inquirer": "6.3.1",
30-
"module": "^1.2.5",
3122
"nunjucks": "^3.2.0",
3223
"ora": "^3.4.0",
3324
"react": "^16.8.3",
3425
"react-dom": "^16.8.3",
3526
"shelljs": "^0.8.3",
3627
"webpack": "^4.39.1",
3728
"webpack-dev-server": "^3.7.2",
29+
"webpack-node-externals": "^1.7.2",
3830
"yargs": "^13.2.4"
3931
},
4032
"devDependencies": {
33+
"@types/webpack": "^4.39.3",
4134
"@types/inquirer": "^6.0.3",
4235
"@types/node": "^12.7.2",
4336
"@types/nunjucks": "^3.1.1",
4437
"@types/react": "^16.8.23",
4538
"@types/react-dom": "^16.8.4",
4639
"@types/shelljs": "^0.8.5",
4740
"@types/yargs": "^13.0.0",
48-
"braces": ">=2.3.1",
49-
"concat-stream": ">=1.5.2",
50-
"lodash.template": ">=4.5.0",
5141
"typescript": "^3.5.2"
5242
},
5343
"keywords": [],

0 commit comments

Comments
 (0)