@modern-js/entry-generator 3.0.7 → 3.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7830 -6380
- package/package.json +7 -7
- package/templates/routes/index.css +40 -44
- package/templates/routes/page.handlebars +64 -16
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "3.0.
|
|
14
|
+
"version": "3.0.9",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"main": "./dist/index.js",
|
|
17
17
|
"files": [
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"@types/node": "^14",
|
|
28
28
|
"jest": "^27",
|
|
29
29
|
"typescript": "^4",
|
|
30
|
-
"@modern-js/generator-
|
|
31
|
-
"@modern-js/
|
|
32
|
-
"@
|
|
33
|
-
"@
|
|
34
|
-
"@
|
|
35
|
-
"@
|
|
30
|
+
"@modern-js/generator-common": "3.0.9",
|
|
31
|
+
"@modern-js/plugin-i18n": "2.7.0",
|
|
32
|
+
"@modern-js/generator-utils": "3.0.9",
|
|
33
|
+
"@modern-js/utils": "2.7.0",
|
|
34
|
+
"@scripts/build": "2.7.0",
|
|
35
|
+
"@scripts/jest-config": "2.7.0"
|
|
36
36
|
},
|
|
37
37
|
"sideEffects": false,
|
|
38
38
|
"publishConfig": {
|
|
@@ -2,8 +2,12 @@ html,
|
|
|
2
2
|
body {
|
|
3
3
|
padding: 0;
|
|
4
4
|
margin: 0;
|
|
5
|
-
font-family:
|
|
6
|
-
|
|
5
|
+
font-family: PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
|
|
6
|
+
background: linear-gradient(to bottom, transparent, #fff) #eceeef;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
p {
|
|
10
|
+
margin: 0;
|
|
7
11
|
}
|
|
8
12
|
|
|
9
13
|
* {
|
|
@@ -19,10 +23,10 @@ body {
|
|
|
19
23
|
flex-direction: column;
|
|
20
24
|
justify-content: center;
|
|
21
25
|
align-items: center;
|
|
26
|
+
padding-top: 10px;
|
|
22
27
|
}
|
|
23
28
|
|
|
24
29
|
main {
|
|
25
|
-
padding: 5rem 0;
|
|
26
30
|
flex: 1;
|
|
27
31
|
display: flex;
|
|
28
32
|
flex-direction: column;
|
|
@@ -30,90 +34,82 @@ main {
|
|
|
30
34
|
align-items: center;
|
|
31
35
|
}
|
|
32
36
|
|
|
33
|
-
.
|
|
34
|
-
width: 100%;
|
|
35
|
-
height: 80px;
|
|
36
|
-
border-top: 1px solid #eaeaea;
|
|
37
|
+
.title {
|
|
37
38
|
display: flex;
|
|
38
|
-
|
|
39
|
+
margin: 4rem 0 4rem;
|
|
39
40
|
align-items: center;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
.footer a {
|
|
44
|
-
display: flex;
|
|
45
|
-
justify-content: center;
|
|
46
|
-
align-items: center;
|
|
47
|
-
flex-grow: 1;
|
|
48
|
-
color: #f4f4f4;
|
|
49
|
-
text-decoration: none;
|
|
50
|
-
font-size: 1.1rem;
|
|
41
|
+
font-size: 4rem;
|
|
42
|
+
font-weight: 600;
|
|
51
43
|
}
|
|
52
44
|
|
|
53
45
|
.logo {
|
|
54
|
-
|
|
46
|
+
width: 6rem;
|
|
47
|
+
margin: 7px 0 0 1rem;
|
|
55
48
|
}
|
|
56
49
|
|
|
57
|
-
.
|
|
58
|
-
|
|
59
|
-
height: 132px;
|
|
50
|
+
.name {
|
|
51
|
+
color: #4ecaff;
|
|
60
52
|
}
|
|
61
53
|
|
|
62
54
|
.description {
|
|
63
55
|
text-align: center;
|
|
64
56
|
line-height: 1.5;
|
|
65
|
-
font-size: 1.
|
|
57
|
+
font-size: 1.3rem;
|
|
58
|
+
color: #1b3a42;
|
|
59
|
+
margin-bottom: 5rem;
|
|
66
60
|
}
|
|
67
61
|
|
|
68
62
|
.code {
|
|
69
63
|
background: #fafafa;
|
|
70
|
-
border-radius:
|
|
71
|
-
padding: 0.
|
|
72
|
-
font-size: 1.
|
|
64
|
+
border-radius: 12px;
|
|
65
|
+
padding: 0.6rem 0.9rem;
|
|
66
|
+
font-size: 1.05rem;
|
|
73
67
|
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
|
|
74
68
|
Bitstream Vera Sans Mono, Courier New, monospace;
|
|
75
69
|
}
|
|
76
70
|
|
|
77
|
-
@media (max-width: 600px) {
|
|
78
|
-
.grid {
|
|
79
|
-
width: 100%;
|
|
80
|
-
flex-direction: column;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
71
|
.container-box .grid {
|
|
85
72
|
display: flex;
|
|
86
73
|
align-items: center;
|
|
87
74
|
justify-content: center;
|
|
88
|
-
|
|
89
|
-
width: 800px;
|
|
75
|
+
width: 1100px;
|
|
90
76
|
margin-top: 3rem;
|
|
91
77
|
}
|
|
92
78
|
|
|
93
79
|
.card {
|
|
94
|
-
margin: 1rem;
|
|
95
80
|
padding: 1.5rem;
|
|
96
81
|
display: flex;
|
|
97
|
-
|
|
82
|
+
flex-direction: column;
|
|
98
83
|
justify-content: center;
|
|
99
84
|
height: 100px;
|
|
100
85
|
color: inherit;
|
|
101
86
|
text-decoration: none;
|
|
102
|
-
|
|
103
|
-
color: #00b2ff;
|
|
104
|
-
transition: color 0.15s ease, border-color 0.15s ease;
|
|
87
|
+
transition: 0.15s ease;
|
|
105
88
|
width: 45%;
|
|
106
89
|
}
|
|
107
90
|
|
|
108
91
|
.card:hover,
|
|
109
|
-
.card:focus
|
|
110
|
-
.card:active {
|
|
92
|
+
.card:focus {
|
|
111
93
|
transform: scale(1.05);
|
|
112
|
-
transition: 0.1s ease-in-out;
|
|
113
94
|
}
|
|
114
95
|
|
|
115
96
|
.card h2 {
|
|
97
|
+
display: flex;
|
|
98
|
+
align-items: center;
|
|
116
99
|
font-size: 1.5rem;
|
|
117
100
|
margin: 0;
|
|
118
101
|
padding: 0;
|
|
119
102
|
}
|
|
103
|
+
|
|
104
|
+
.card p {
|
|
105
|
+
opacity: 0.6;
|
|
106
|
+
font-size: 0.9rem;
|
|
107
|
+
line-height: 1.5;
|
|
108
|
+
margin-top: 1rem;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.arrow-right {
|
|
112
|
+
width: 1.3rem;
|
|
113
|
+
margin-left: 0.5rem;
|
|
114
|
+
margin-top: 3px;
|
|
115
|
+
}
|
|
@@ -1,43 +1,91 @@
|
|
|
1
|
+
import { Helmet } from '@modern-js/runtime/head';
|
|
1
2
|
import './index.css';
|
|
2
3
|
|
|
3
4
|
const Index = () => (
|
|
4
5
|
<div className="container-box">
|
|
6
|
+
<Helmet>
|
|
7
|
+
<link
|
|
8
|
+
rel="icon"
|
|
9
|
+
type="image/x-icon"
|
|
10
|
+
href="https://lf3-static.bytednsdoc.com/obj/eden-cn/uhbfnupenuhf/favicon.ico"
|
|
11
|
+
/>
|
|
12
|
+
</Helmet>
|
|
5
13
|
<main>
|
|
6
|
-
<div className="
|
|
14
|
+
<div className="title">
|
|
15
|
+
Welcome to
|
|
7
16
|
<img
|
|
8
|
-
|
|
9
|
-
|
|
17
|
+
className="logo"
|
|
18
|
+
src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/modern-js-logo.svg"
|
|
10
19
|
alt="Modern.js Logo"
|
|
11
20
|
/>
|
|
21
|
+
<p className="name">Modern.js</p>
|
|
12
22
|
</div>
|
|
13
23
|
<p className="description">
|
|
14
24
|
Get started by editing <code className="code">src/routes/page.tsx</code>
|
|
15
25
|
</p>
|
|
16
26
|
<div className="grid">
|
|
17
|
-
<a
|
|
18
|
-
|
|
27
|
+
<a
|
|
28
|
+
href="https://modernjs.dev/guides/get-started/introduction.html"
|
|
29
|
+
target="_blank"
|
|
30
|
+
rel="noopener noreferrer"
|
|
31
|
+
className="card"
|
|
32
|
+
>
|
|
33
|
+
<h2>
|
|
34
|
+
Guide
|
|
35
|
+
<img
|
|
36
|
+
className="arrow-right"
|
|
37
|
+
src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"
|
|
38
|
+
/>
|
|
39
|
+
</h2>
|
|
40
|
+
<p>Follow the guides to use all features of Modern.js.</p>
|
|
19
41
|
</a>
|
|
20
|
-
<a
|
|
21
|
-
|
|
42
|
+
<a
|
|
43
|
+
href="https://modernjs.dev/tutorials/foundations/introduction.html"
|
|
44
|
+
target="_blank"
|
|
45
|
+
className="card"
|
|
46
|
+
rel="noreferrer"
|
|
47
|
+
>
|
|
48
|
+
<h2>
|
|
49
|
+
Tutorials
|
|
50
|
+
<img
|
|
51
|
+
className="arrow-right"
|
|
52
|
+
src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"
|
|
53
|
+
/>
|
|
54
|
+
</h2>
|
|
55
|
+
<p>Learn to use Modern.js to create your first application.</p>
|
|
22
56
|
</a>
|
|
23
|
-
<a
|
|
24
|
-
|
|
57
|
+
<a
|
|
58
|
+
href="https://modernjs.dev/configure/app/usage.html"
|
|
59
|
+
target="_blank"
|
|
60
|
+
className="card"
|
|
61
|
+
rel="noreferrer"
|
|
62
|
+
>
|
|
63
|
+
<h2>
|
|
64
|
+
Config
|
|
65
|
+
<img
|
|
66
|
+
className="arrow-right"
|
|
67
|
+
src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"
|
|
68
|
+
/>
|
|
69
|
+
</h2>
|
|
70
|
+
<p>Find all configuration items provided by Modern.js.</p>
|
|
25
71
|
</a>
|
|
26
72
|
<a
|
|
27
|
-
href="https://
|
|
73
|
+
href="https://github.com/modern-js-dev/modern.js"
|
|
28
74
|
target="_blank"
|
|
29
75
|
rel="noopener noreferrer"
|
|
30
76
|
className="card"
|
|
31
77
|
>
|
|
32
|
-
<h2>
|
|
78
|
+
<h2>
|
|
79
|
+
Github
|
|
80
|
+
<img
|
|
81
|
+
className="arrow-right"
|
|
82
|
+
src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"
|
|
83
|
+
/>
|
|
84
|
+
</h2>
|
|
85
|
+
<p>View the source code of Github, feel free to contribute.</p>
|
|
33
86
|
</a>
|
|
34
87
|
</div>
|
|
35
88
|
</main>
|
|
36
|
-
<footer className="footer">
|
|
37
|
-
<a href="https://modernjs.dev" target="_blank" rel="noopener noreferrer">
|
|
38
|
-
Powered by Modern.js
|
|
39
|
-
</a>
|
|
40
|
-
</footer>
|
|
41
89
|
</div>
|
|
42
90
|
);
|
|
43
91
|
|