@modern-js/entry-generator 2.4.10 → 3.0.0-beta.1
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 +45389 -49827
- package/package.json +12 -37
- package/templates/{main.css → routes/index.css} +0 -0
- package/templates/routes/layout.handlebars +9 -0
- package/templates/routes/page.handlebars +44 -0
- package/templates/base/App.handlebars +0 -7
- package/templates/main.handlebars +0 -40
- package/templates/pages-router/index.handlebars +0 -7
- package/templates/router/App.handlebars +0 -16
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "
|
|
14
|
+
"version": "3.0.0-beta.1",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"main": "./dist/index.js",
|
|
17
17
|
"files": [
|
|
@@ -20,19 +20,19 @@
|
|
|
20
20
|
],
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@babel/runtime": "^7.18.0",
|
|
23
|
-
"@modern-js/codesmith": "
|
|
24
|
-
"@modern-js/codesmith-api-app": "
|
|
25
|
-
"@modern-js/codesmith-api-handlebars": "
|
|
23
|
+
"@modern-js/codesmith": "2.0.0",
|
|
24
|
+
"@modern-js/codesmith-api-app": "2.0.0",
|
|
25
|
+
"@modern-js/codesmith-api-handlebars": "2.0.0",
|
|
26
26
|
"@types/jest": "^27",
|
|
27
27
|
"@types/node": "^14",
|
|
28
28
|
"jest": "^27",
|
|
29
29
|
"typescript": "^4",
|
|
30
|
-
"@modern-js/generator-common": "
|
|
31
|
-
"@modern-js/generator-utils": "
|
|
32
|
-
"@modern-js/plugin-i18n": "
|
|
33
|
-
"@modern-js/utils": "
|
|
34
|
-
"@scripts/build": "
|
|
35
|
-
"@scripts/jest-config": "
|
|
30
|
+
"@modern-js/generator-common": "3.0.0-beta.1",
|
|
31
|
+
"@modern-js/generator-utils": "3.0.0-beta.1",
|
|
32
|
+
"@modern-js/plugin-i18n": "2.0.0-beta.1",
|
|
33
|
+
"@modern-js/utils": "2.0.0-beta.1",
|
|
34
|
+
"@scripts/build": "2.0.0-beta.1",
|
|
35
|
+
"@scripts/jest-config": "2.0.0-beta.1"
|
|
36
36
|
},
|
|
37
37
|
"sideEffects": false,
|
|
38
38
|
"modernConfig": {
|
|
@@ -46,34 +46,9 @@
|
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
48
|
"types": "./src/index.ts",
|
|
49
|
-
"wireit": {
|
|
50
|
-
"build": {
|
|
51
|
-
"command": "modern build",
|
|
52
|
-
"files": [
|
|
53
|
-
"src/**/*",
|
|
54
|
-
"tsconfig.json",
|
|
55
|
-
"package.json",
|
|
56
|
-
"modern.config.js"
|
|
57
|
-
],
|
|
58
|
-
"output": [
|
|
59
|
-
"dist/**/*",
|
|
60
|
-
"!dist/node/main.js"
|
|
61
|
-
]
|
|
62
|
-
},
|
|
63
|
-
"test": {
|
|
64
|
-
"command": "jest --passWithNoTests",
|
|
65
|
-
"files": [
|
|
66
|
-
"src/**/*",
|
|
67
|
-
"tsconfig.json",
|
|
68
|
-
"package.json",
|
|
69
|
-
"tests/**/*"
|
|
70
|
-
],
|
|
71
|
-
"output": []
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
49
|
"scripts": {
|
|
75
50
|
"new": "modern new",
|
|
76
|
-
"build": "
|
|
77
|
-
"test": "
|
|
51
|
+
"build": "modern build",
|
|
52
|
+
"test": "jest --passWithNoTests"
|
|
78
53
|
}
|
|
79
54
|
}
|
|
File without changes
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
|
|
3
|
+
const Index = () => (
|
|
4
|
+
<div className="container-box">
|
|
5
|
+
<main>
|
|
6
|
+
<div className="logo">
|
|
7
|
+
<img
|
|
8
|
+
src="https://lf3-static.bytednsdoc.com/obj/eden-cn/ylaelkeh7nuhfnuhf/modernjs-cover.png"
|
|
9
|
+
width="300"
|
|
10
|
+
alt="Modern.js Logo"
|
|
11
|
+
/>
|
|
12
|
+
</div>
|
|
13
|
+
<p className="description">
|
|
14
|
+
Get started by editing <code className="code">src/routes/page.tsx</code>
|
|
15
|
+
</p>
|
|
16
|
+
<div className="grid">
|
|
17
|
+
<a href="https://modernjs.dev/docs/start" className="card">
|
|
18
|
+
<h2>Quick Start</h2>
|
|
19
|
+
</a>
|
|
20
|
+
<a href="https://modernjs.dev/docs/guides" className="card">
|
|
21
|
+
<h2>Handbook</h2>
|
|
22
|
+
</a>
|
|
23
|
+
<a href="https://modernjs.dev/docs/apis/app/overview" className="card">
|
|
24
|
+
<h2>API Reference </h2>
|
|
25
|
+
</a>
|
|
26
|
+
<a
|
|
27
|
+
href="https://modernjs.dev/blog"
|
|
28
|
+
target="_blank"
|
|
29
|
+
rel="noopener noreferrer"
|
|
30
|
+
className="card"
|
|
31
|
+
>
|
|
32
|
+
<h2>Blog</h2>
|
|
33
|
+
</a>
|
|
34
|
+
</div>
|
|
35
|
+
</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
|
+
</div>
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
export default Index;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
{{space}}<div className="container-box">
|
|
2
|
-
{{space}} <main>
|
|
3
|
-
{{space}} <div className="logo">
|
|
4
|
-
{{space}} <img
|
|
5
|
-
{{space}} src="https://lf3-static.bytednsdoc.com/obj/eden-cn/ylaelkeh7nuhfnuhf/modernjs-cover.png"
|
|
6
|
-
{{space}} width="300"
|
|
7
|
-
{{space}} alt="Modern.js Logo"
|
|
8
|
-
{{space}} />
|
|
9
|
-
{{space}} </div>
|
|
10
|
-
{{space}} <p className="description">
|
|
11
|
-
{{space}} Get started by editing <code className="code">src/{{entry}}</code>
|
|
12
|
-
{{space}} </p>
|
|
13
|
-
{{space}} <div className="grid">
|
|
14
|
-
{{space}} <a href="https://modernjs.dev/docs/start" className="card">
|
|
15
|
-
{{space}} <h2>Quick Start</h2>
|
|
16
|
-
{{space}} </a>
|
|
17
|
-
{{space}} <a href="https://modernjs.dev/docs/guides" className="card">
|
|
18
|
-
{{space}} <h2>Handbook</h2>
|
|
19
|
-
{{space}} </a>
|
|
20
|
-
{{space}} <a href="https://modernjs.dev/docs/apis/app" className="card">
|
|
21
|
-
{{space}} <h2>API Reference </h2>
|
|
22
|
-
{{space}} </a>
|
|
23
|
-
{{space}} <a
|
|
24
|
-
{{space}} href="https://modernjs.dev/blog"
|
|
25
|
-
{{space}} target="_blank"
|
|
26
|
-
{{space}} rel="noopener noreferrer"
|
|
27
|
-
{{space}} className="card">
|
|
28
|
-
{{space}} <h2>Blog </h2>
|
|
29
|
-
{{space}} </a>
|
|
30
|
-
{{space}} </div>
|
|
31
|
-
{{space}} </main>
|
|
32
|
-
{{space}} <footer className="footer">
|
|
33
|
-
{{space}} <a
|
|
34
|
-
{{space}} href="https://modernjs.dev"
|
|
35
|
-
{{space}} target="_blank"
|
|
36
|
-
{{space}} rel="noopener noreferrer">
|
|
37
|
-
{{space}} Powered by Modern.js
|
|
38
|
-
{{space}} </a>
|
|
39
|
-
{{space}} </footer>
|
|
40
|
-
{{space}}</div>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Switch, Route } from '@modern-js/runtime/router';
|
|
2
|
-
|
|
3
|
-
import './App.css';
|
|
4
|
-
|
|
5
|
-
const App = () => (
|
|
6
|
-
<Switch>
|
|
7
|
-
<Route exact={true} path="/">
|
|
8
|
-
{{{main}}}
|
|
9
|
-
</Route>
|
|
10
|
-
<Route path="*">
|
|
11
|
-
<div>404</div>
|
|
12
|
-
</Route>
|
|
13
|
-
</Switch>
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
export default App;
|