@bleedingdev/modern-js-create 3.2.0-ultramodern.11 → 3.2.0-ultramodern.13
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 +268 -22
- package/package.json +3 -3
- package/template/AGENTS.md +7 -0
- package/template/config/public/locales/cs/translation.json +39 -0
- package/template/config/public/locales/en/translation.json +39 -0
- package/template/modern.config.ts.handlebars +26 -1
- package/template/package.json.handlebars +8 -3
- package/template/scripts/check-i18n-strings.mjs +83 -0
- package/template/scripts/validate-ultramodern.mjs.handlebars +40 -0
- package/template/src/modern-app-env.d.ts +2 -0
- package/template/src/modern.runtime.ts.handlebars +17 -1
- package/template/src/routes/[lang]/page.tsx.handlebars +211 -0
- package/template-workspace/AGENTS.md +8 -1
- package/template-workspace/scripts/check-i18n-strings.mjs +83 -0
- package/template-workspace/scripts/validate-ultramodern-workspace.mjs.handlebars +67 -0
- package/template/src/routes/page.tsx.handlebars +0 -136
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import { Helmet } from '@modern-js/runtime/head';
|
|
2
|
-
{{#if useEffectBff}}import effectBff from '@api/effect/index';
|
|
3
|
-
import { Effect } from '@modern-js/plugin-bff/effect-client';
|
|
4
|
-
import { useEffect, useState } from 'react';
|
|
5
|
-
{{/if}}
|
|
6
|
-
import './index.css';
|
|
7
|
-
|
|
8
|
-
const Index = () => {
|
|
9
|
-
{{#if useEffectBff}} const [effectMessage, setEffectMessage] = useState('loading...');
|
|
10
|
-
|
|
11
|
-
useEffect(() => {
|
|
12
|
-
let mounted = true;
|
|
13
|
-
Effect.runFork(
|
|
14
|
-
Effect.promise(() => effectBff.client.greetings.hello({})).pipe(
|
|
15
|
-
Effect.tap((data) =>
|
|
16
|
-
Effect.sync(() => {
|
|
17
|
-
if (mounted) {
|
|
18
|
-
setEffectMessage(data.message);
|
|
19
|
-
}
|
|
20
|
-
}),
|
|
21
|
-
),
|
|
22
|
-
),
|
|
23
|
-
);
|
|
24
|
-
return () => {
|
|
25
|
-
mounted = false;
|
|
26
|
-
};
|
|
27
|
-
}, []);
|
|
28
|
-
{{/if}}
|
|
29
|
-
return (
|
|
30
|
-
<div className="container-box">
|
|
31
|
-
<Helmet>
|
|
32
|
-
<link
|
|
33
|
-
rel="icon"
|
|
34
|
-
type="image/x-icon"
|
|
35
|
-
href="https://lf3-static.bytednsdoc.com/obj/eden-cn/uhbfnupenuhf/favicon.ico"
|
|
36
|
-
/>
|
|
37
|
-
</Helmet>
|
|
38
|
-
<main>
|
|
39
|
-
<div className="title">
|
|
40
|
-
UltraModern.js 3.0
|
|
41
|
-
<img
|
|
42
|
-
className="logo"
|
|
43
|
-
src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/modern-js-logo.svg"
|
|
44
|
-
alt="UltraModern.js Logo"
|
|
45
|
-
/>
|
|
46
|
-
<p className="name">presetUltramodern</p>
|
|
47
|
-
</div>
|
|
48
|
-
<p className="description{{#if enableTailwind}} text-emerald-700 font-semibold{{/if}}">
|
|
49
|
-
This starter ships the public <code className="code">presetUltramodern(...)</code>{' '}
|
|
50
|
-
profile. Start in
|
|
51
|
-
<code className="code">modern.config.ts</code>, keep
|
|
52
|
-
<code className="code">pnpm run ultramodern:check</code> green, and tune the generated
|
|
53
|
-
preset only where your app needs a softer lane.
|
|
54
|
-
</p>
|
|
55
|
-
{{#if useEffectBff}}
|
|
56
|
-
<p className="description effect-message{{#if enableTailwind}} text-emerald-700 font-semibold{{/if}}">
|
|
57
|
-
Effect HttpApi response: <code className="code">{effectMessage}</code>
|
|
58
|
-
</p>
|
|
59
|
-
{{/if}}
|
|
60
|
-
<div className="grid">
|
|
61
|
-
<a
|
|
62
|
-
href="https://bleedingdev.github.io/ultramodern.js/guides/get-started/ultramodern.html"
|
|
63
|
-
target="_blank"
|
|
64
|
-
rel="noopener noreferrer"
|
|
65
|
-
className="card"
|
|
66
|
-
>
|
|
67
|
-
<h2>
|
|
68
|
-
UltraModern.js Guide
|
|
69
|
-
<img
|
|
70
|
-
className="arrow-right"
|
|
71
|
-
src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"
|
|
72
|
-
alt="Guide"
|
|
73
|
-
/>
|
|
74
|
-
</h2>
|
|
75
|
-
<p>Review the MV-first, TanStack-ready, Effect-ready public preset.</p>
|
|
76
|
-
</a>
|
|
77
|
-
<a
|
|
78
|
-
href="https://bleedingdev.github.io/ultramodern.js/configure/app/usage.html"
|
|
79
|
-
target="_blank"
|
|
80
|
-
className="card"
|
|
81
|
-
rel="noreferrer"
|
|
82
|
-
>
|
|
83
|
-
<h2>
|
|
84
|
-
Configure presetUltramodern
|
|
85
|
-
<img
|
|
86
|
-
className="arrow-right"
|
|
87
|
-
src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"
|
|
88
|
-
alt="Tutorials"
|
|
89
|
-
/>
|
|
90
|
-
</h2>
|
|
91
|
-
<p>
|
|
92
|
-
Tune the generated defaults in <code className="code">modern.config.ts</code>.
|
|
93
|
-
</p>
|
|
94
|
-
</a>
|
|
95
|
-
<a
|
|
96
|
-
href="https://github.com/BleedingDev/ultramodern.js/blob/main-ultramodern/packages/toolkit/create/template/.github/workflows/ultramodern-gates.yml.handlebars"
|
|
97
|
-
target="_blank"
|
|
98
|
-
className="card"
|
|
99
|
-
rel="noreferrer"
|
|
100
|
-
>
|
|
101
|
-
<h2>
|
|
102
|
-
Ultramodern Gates
|
|
103
|
-
<img
|
|
104
|
-
className="arrow-right"
|
|
105
|
-
src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"
|
|
106
|
-
alt="Config"
|
|
107
|
-
/>
|
|
108
|
-
</h2>
|
|
109
|
-
<p>
|
|
110
|
-
The starter includes a PR workflow for <code className="code">ultramodern:check</code>{' '}
|
|
111
|
-
and build.
|
|
112
|
-
</p>
|
|
113
|
-
</a>
|
|
114
|
-
<a
|
|
115
|
-
href="https://bleedingdev.github.io/ultramodern.js/configure/app/bff/effect.html"
|
|
116
|
-
target="_blank"
|
|
117
|
-
rel="noopener noreferrer"
|
|
118
|
-
className="card"
|
|
119
|
-
>
|
|
120
|
-
<h2>
|
|
121
|
-
BFF + Effect
|
|
122
|
-
<img
|
|
123
|
-
className="arrow-right"
|
|
124
|
-
src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"
|
|
125
|
-
alt="Github"
|
|
126
|
-
/>
|
|
127
|
-
</h2>
|
|
128
|
-
<p>Keep Effect as the preferred BFF lane while Hono stays an explicit fallback.</p>
|
|
129
|
-
</a>
|
|
130
|
-
</div>
|
|
131
|
-
</main>
|
|
132
|
-
</div>
|
|
133
|
-
);
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
export default Index;
|