Skip to content

Commit 4dcd9b6

Browse files
committed
[optimize] update Project Data
[optimize] upgrade Upstream packages
1 parent c8185aa commit 4dcd9b6

6 files changed

Lines changed: 75 additions & 30 deletions

File tree

package.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,29 +20,30 @@
2020
"url": "https://github.com/EasyWebApp/EasyWebApp.github.io/issues"
2121
},
2222
"dependencies": {
23-
"boot-cell": "^1.0.0-rc.36",
23+
"boot-cell": "^1.0.1",
24+
"bootstrap-icons": "^1.0.0-alpha5",
2425
"cell-router": "^2.0.0-rc.8",
2526
"classnames": "^2.2.6",
2627
"github-web-widget": "^3.0.0-beta.5",
2728
"koajax": "^0.6.2",
2829
"marked": "^1.1.1",
29-
"mobx": "^5.15.5",
30+
"mobx": "^5.15.6",
3031
"mobx-web-cell": "^0.3.1",
3132
"prismjs": "^1.21.0",
32-
"web-cell": "^2.1.3",
33-
"web-utility": "^1.7.0"
33+
"web-cell": "^2.2.0",
34+
"web-utility": "^1.8.0"
3435
},
3536
"devDependencies": {
36-
"@babel/core": "^7.11.1",
37+
"@babel/core": "^7.11.4",
3738
"@types/classnames": "^2.2.10",
3839
"autoprefixer": "^9.8.6",
3940
"husky": "^4.2.5",
4041
"less": "^3.12.2",
41-
"lint-staged": "^10.2.11",
42+
"lint-staged": "^10.2.13",
4243
"parcel-bundler": "^1.12.4",
43-
"postcss-modules": "^3.2.0",
44-
"prettier": "^2.0.5",
45-
"typescript": "^3.9.7",
44+
"postcss-modules": "^3.2.2",
45+
"prettier": "^2.1.1",
46+
"typescript": "^4.0.2",
4647
"workbox-cli": "^4.3.1"
4748
},
4849
"prettier": {

source/page/Case.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function Case({
4747

4848
export function CasePage() {
4949
return (
50-
<Fragment>
50+
<>
5151
<h2 className="display-4 text-center pt-5">用户案例</h2>
5252
<p className="lead text-center">User cases</p>
5353

@@ -65,6 +65,6 @@ export function CasePage() {
6565
</div>
6666
);
6767
})}
68-
</Fragment>
68+
</>
6969
);
7070
}

source/page/Main.tsx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { createCell, Fragment } from 'web-cell';
22
import classNames from 'classnames';
33
import { Button } from 'boot-cell/source/Form/Button';
44
import { TooltipBox } from 'boot-cell/source/Prompt/Tooltip';
5-
import { DropMenu, DropMenuProps } from 'boot-cell/source/Navigator/DropMenu';
5+
import { DropMenu, DropMenuItem } from 'boot-cell/source/Navigator/DropMenu';
66
import { Embed } from 'boot-cell/source/Media/Embed';
77
import { Image } from 'boot-cell/source/Media/Image';
88

@@ -12,7 +12,7 @@ import { WebCell_1 } from '../image';
1212

1313
export function MainPage() {
1414
return (
15-
<Fragment>
15+
<>
1616
<section className="position-relative overflow-hidden p-3 p-md-5 m-md-3 text-center bg-light">
1717
<div className="col-md-5 p-lg-5 mx-auto my-5">
1818
<p>
@@ -28,11 +28,13 @@ export function MainPage() {
2828
在线体验
2929
</Button>
3030
<TooltipBox text="需先登录 GitHub">
31-
<DropMenu
32-
buttonKind="success"
33-
title="新建项目"
34-
list={scaffold as DropMenuProps['list']}
35-
/>
31+
<DropMenu buttonColor="success" caption="新建项目">
32+
{scaffold.map(({ title, ...rest }) => (
33+
<DropMenuItem {...rest}>
34+
{title}
35+
</DropMenuItem>
36+
))}
37+
</DropMenu>
3638
</TooltipBox>
3739
</div>
3840
</div>
@@ -58,7 +60,7 @@ export function MainPage() {
5860
<h2 className="text-center display-4 mb-5">核心特性</h2>
5961

6062
{feature.map(({ title, summary, link, logo }, index) => (
61-
<Fragment>
63+
<>
6264
<section
6365
className={classNames(
6466
'row',
@@ -89,9 +91,9 @@ export function MainPage() {
8991
)}
9092
/>
9193
) : null}
92-
</Fragment>
94+
</>
9395
))}
9496
</div>
95-
</Fragment>
97+
</>
9698
);
9799
}

source/page/Router.tsx

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { component, createCell, Fragment } from 'web-cell';
22
import { observer } from 'mobx-web-cell';
33
import { HTMLRouter } from 'cell-router/source';
44
import { NavBar } from 'boot-cell/source/Navigator/NavBar';
5+
import { NavLink } from 'boot-cell/source/Navigator/Nav';
56
import { isXDomain } from 'web-utility';
67

78
import { history } from '../model';
@@ -28,7 +29,7 @@ export class PageRouter extends HTMLRouter {
2829

2930
renderCopyright() {
3031
return (
31-
<Fragment>
32+
<>
3233
<img
3334
className="d-block mb-2"
3435
style={{ maxWidth: '1.5rem' }}
@@ -91,7 +92,7 @@ export class PageRouter extends HTMLRouter {
9192
</a>
9293
上的作品创作。
9394
</small>
94-
</Fragment>
95+
</>
9596
);
9697
}
9798

@@ -116,19 +117,23 @@ export class PageRouter extends HTMLRouter {
116117

117118
render() {
118119
return (
119-
<Fragment>
120+
<>
120121
<NavBar
121122
narrow
122123
menuAlign="around"
123-
menu={header}
124124
brand={
125125
<img
126126
alt="WebCell"
127127
src={WebCell_0}
128128
style={{ width: '2rem' }}
129129
/>
130130
}
131-
/>
131+
>
132+
{header.map(({ title, ...rest }) => (
133+
<NavLink {...rest}>{title}</NavLink>
134+
))}
135+
</NavBar>
136+
132137
<main>{super.render()}</main>
133138

134139
<hr className={style['featurette-divider']} />
@@ -148,7 +153,7 @@ export class PageRouter extends HTMLRouter {
148153
{footer.map(this.renderFooterList)}
149154
</div>
150155
</footer>
151-
</Fragment>
156+
</>
152157
);
153158
}
154159
}

source/page/data.ts

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { DropMenuItemProps } from 'boot-cell/source/Navigator/DropMenu';
12
import { WebCell_0 } from '../image';
23

34
export const footer = [
@@ -58,7 +59,7 @@ export const footer = [
5859
href: 'http://es6-features.org/'
5960
},
6061
{
61-
title: 'TypeScript 3+',
62+
title: 'TypeScript 4+',
6263
href: 'https://www.typescriptlang.org/'
6364
}
6465
]
@@ -84,7 +85,7 @@ export const footer = [
8485

8586
export const header = [...footer[0].menu, ...footer[2].menu];
8687

87-
export const scaffold = Object.entries({
88+
export const scaffold: DropMenuItemProps[] = Object.entries({
8889
scaffold: '前台项目',
8990
DashBoard: '后台项目',
9091
'mark-wiki': '静态网站'
@@ -103,7 +104,7 @@ export const feature = [
103104
link: 'https://www.webcomponents.org/'
104105
},
105106
{
106-
title: '语法遵循 TypeScript 3、Decorator 提案 和 JSX',
107+
title: '语法遵循 TypeScript 4、Decorator 提案 和 JSX',
107108
summary: '声明式组件代码,简洁、优雅,一键享受 ECMAScript 成熟提案语法',
108109
logo:
109110
'https://raw.githubusercontent.com/github/explore/80688e429a7d4ef2fca1e82350fe8e3517d3494d/topics/typescript/typescript.png',
@@ -195,6 +196,11 @@ export const upstream = [
195196
repo: 'babel-upgrade',
196197
pull: 92
197198
},
199+
{
200+
org: 'TypeStrong',
201+
repo: 'ts-node',
202+
issue: 990
203+
},
198204
{
199205
org: 'jsdom',
200206
repo: 'jsdom',
@@ -209,6 +215,36 @@ export const upstream = [
209215
org: 'jsdom',
210216
repo: 'w3c-xmlserializer',
211217
pull: 3
218+
},
219+
{
220+
org: 'capricorn86',
221+
repo: 'happy-dom',
222+
issue: 33
223+
},
224+
{
225+
org: 'snabbdom',
226+
repo: 'snabbdom',
227+
issue: 797
228+
},
229+
{
230+
org: 'jvanbruegge',
231+
repo: 'snabbdom-looks-like',
232+
pull: 2
233+
},
234+
{
235+
org: 'parcel-bundler',
236+
repo: 'parcel',
237+
issue: 4205
238+
},
239+
{
240+
org: 'developit',
241+
repo: 'microbundle',
242+
issue: 711
243+
},
244+
{
245+
org: 'BuilderIO',
246+
repo: 'builder',
247+
issue: 95
212248
}
213249
];
214250

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"experimentalDecorators": true,
99
"jsx": "react",
1010
"jsxFactory": "createCell",
11+
"jsxFragmentFactory": "Fragment",
1112
"lib": ["ES2019", "DOM"]
1213
},
1314
"include": ["source/**/*"]

0 commit comments

Comments
 (0)