@nx/web 0.0.0-pr-22179-271588f
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/LICENSE +22 -0
- package/README.md +68 -0
- package/babel.d.ts +1 -0
- package/babel.js +6 -0
- package/executors.json +16 -0
- package/generators.json +25 -0
- package/index.d.ts +3 -0
- package/index.js +9 -0
- package/migrations.json +51 -0
- package/package.json +45 -0
- package/src/executors/file-server/compat.d.ts +2 -0
- package/src/executors/file-server/compat.js +5 -0
- package/src/executors/file-server/file-server.impl.d.ts +8 -0
- package/src/executors/file-server/file-server.impl.js +210 -0
- package/src/executors/file-server/schema.d.ts +20 -0
- package/src/executors/file-server/schema.json +98 -0
- package/src/generators/application/application.d.ts +5 -0
- package/src/generators/application/application.js +353 -0
- package/src/generators/application/files/app-vite/.babelrc__tmpl__ +5 -0
- package/src/generators/application/files/app-vite/index.html__tmpl__ +16 -0
- package/src/generators/application/files/app-vite/public/favicon.ico +0 -0
- package/src/generators/application/files/app-vite/src/app/app.element.__style__ +424 -0
- package/src/generators/application/files/app-vite/src/app/app.element.spec.ts__tmpl__ +21 -0
- package/src/generators/application/files/app-vite/src/app/app.element.ts__tmpl__ +409 -0
- package/src/generators/application/files/app-vite/src/assets/.gitkeep +0 -0
- package/src/generators/application/files/app-vite/src/main.ts__tmpl__ +1 -0
- package/src/generators/application/files/app-vite/src/styles.__style__ +1 -0
- package/src/generators/application/files/app-vite/tsconfig.app.json +9 -0
- package/src/generators/application/files/app-vite/tsconfig.json__tmpl__ +27 -0
- package/src/generators/application/files/app-webpack/src/app/app.element.__style__ +424 -0
- package/src/generators/application/files/app-webpack/src/app/app.element.spec.ts__tmpl__ +21 -0
- package/src/generators/application/files/app-webpack/src/app/app.element.ts__tmpl__ +409 -0
- package/src/generators/application/files/app-webpack/src/assets/.gitkeep +0 -0
- package/src/generators/application/files/app-webpack/src/favicon.ico +0 -0
- package/src/generators/application/files/app-webpack/src/index.html +14 -0
- package/src/generators/application/files/app-webpack/src/main.ts__tmpl__ +1 -0
- package/src/generators/application/files/app-webpack/src/styles.__style__ +1 -0
- package/src/generators/application/files/app-webpack/tsconfig.app.json +9 -0
- package/src/generators/application/files/app-webpack/tsconfig.json +10 -0
- package/src/generators/application/files/app-webpack/webpack.config.js__tmpl__ +39 -0
- package/src/generators/application/schema.d.ts +21 -0
- package/src/generators/application/schema.json +113 -0
- package/src/generators/init/init.d.ts +4 -0
- package/src/generators/init/init.js +23 -0
- package/src/generators/init/schema.d.ts +5 -0
- package/src/generators/init/schema.json +28 -0
- package/src/generators/static-serve/schema.json +24 -0
- package/src/generators/static-serve/static-serve-configuration.d.ts +8 -0
- package/src/generators/static-serve/static-serve-configuration.js +73 -0
- package/src/migrations/update-15-0-0/add-babel-inputs.d.ts +2 -0
- package/src/migrations/update-15-0-0/add-babel-inputs.js +9 -0
- package/src/migrations/update-15-0-0/update-rollup-executor.d.ts +2 -0
- package/src/migrations/update-15-0-0/update-rollup-executor.js +33 -0
- package/src/migrations/update-15-5-4/update-babel-preset.d.ts +2 -0
- package/src/migrations/update-15-5-4/update-babel-preset.js +32 -0
- package/src/migrations/update-15-9-1/add-dropped-dependencies.d.ts +2 -0
- package/src/migrations/update-15-9-1/add-dropped-dependencies.js +35 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +2 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +9 -0
- package/src/migrations/update-16-0-0-update-executors/update-16-0-0-update-executors.d.ts +2 -0
- package/src/migrations/update-16-0-0-update-executors/update-16-0-0-update-executors.js +34 -0
- package/src/plugins/webpack-nx-build-coordination-plugin.d.ts +1 -0
- package/src/plugins/webpack-nx-build-coordination-plugin.js +5 -0
- package/src/utils/fs.d.ts +1 -0
- package/src/utils/fs.js +4 -0
- package/src/utils/has-webpack-plugin.d.ts +2 -0
- package/src/utils/has-webpack-plugin.js +11 -0
- package/src/utils/normalize.d.ts +1 -0
- package/src/utils/normalize.js +4 -0
- package/src/utils/versions.d.ts +4 -0
- package/src/utils/versions.js +7 -0
- package/src/utils/wait-for-port-open.d.ts +5 -0
- package/src/utils/wait-for-port-open.js +45 -0
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
import './app.element.<%= style %>';
|
|
2
|
+
|
|
3
|
+
export class AppElement extends HTMLElement {
|
|
4
|
+
public static observedAttributes = [
|
|
5
|
+
|
|
6
|
+
];
|
|
7
|
+
|
|
8
|
+
connectedCallback() {
|
|
9
|
+
const title = '<%= projectName %>';
|
|
10
|
+
this.innerHTML = `
|
|
11
|
+
<div class="wrapper">
|
|
12
|
+
<div class="container">
|
|
13
|
+
<!-- WELCOME -->
|
|
14
|
+
<div id="welcome">
|
|
15
|
+
<h1>
|
|
16
|
+
<span> Hello there, </span>
|
|
17
|
+
Welcome ${title} 👋
|
|
18
|
+
</h1>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<!-- HERO -->
|
|
22
|
+
<div id="hero" class="rounded">
|
|
23
|
+
<div class="text-container">
|
|
24
|
+
<h2>
|
|
25
|
+
<svg
|
|
26
|
+
fill="none"
|
|
27
|
+
stroke="currentColor"
|
|
28
|
+
viewBox="0 0 24 24"
|
|
29
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
30
|
+
>
|
|
31
|
+
<path
|
|
32
|
+
stroke-linecap="round"
|
|
33
|
+
stroke-linejoin="round"
|
|
34
|
+
stroke-width="2"
|
|
35
|
+
d="M9 12l2 2 4-4M7.835 4.697a3.42 3.42 0 001.946-.806 3.42 3.42 0 014.438 0 3.42 3.42 0 001.946.806 3.42 3.42 0 013.138 3.138 3.42 3.42 0 00.806 1.946 3.42 3.42 0 010 4.438 3.42 3.42 0 00-.806 1.946 3.42 3.42 0 01-3.138 3.138 3.42 3.42 0 00-1.946.806 3.42 3.42 0 01-4.438 0 3.42 3.42 0 00-1.946-.806 3.42 3.42 0 01-3.138-3.138 3.42 3.42 0 00-.806-1.946 3.42 3.42 0 010-4.438 3.42 3.42 0 00.806-1.946 3.42 3.42 0 013.138-3.138z"
|
|
36
|
+
/>
|
|
37
|
+
</svg>
|
|
38
|
+
<span>You're up and running</span>
|
|
39
|
+
</h2>
|
|
40
|
+
<a href="#commands"> What's next? </a>
|
|
41
|
+
</div>
|
|
42
|
+
<div class="logo-container">
|
|
43
|
+
<svg
|
|
44
|
+
fill="currentColor"
|
|
45
|
+
role="img"
|
|
46
|
+
viewBox="0 0 24 24"
|
|
47
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
48
|
+
>
|
|
49
|
+
<path
|
|
50
|
+
d="M11.987 14.138l-3.132 4.923-5.193-8.427-.012 8.822H0V4.544h3.691l5.247 8.833.005-3.998 3.044 4.759zm.601-5.761c.024-.048 0-3.784.008-3.833h-3.65c.002.059-.005 3.776-.003 3.833h3.645zm5.634 4.134a2.061 2.061 0 0 0-1.969 1.336 1.963 1.963 0 0 1 2.343-.739c.396.161.917.422 1.33.283a2.1 2.1 0 0 0-1.704-.88zm3.39 1.061c-.375-.13-.8-.277-1.109-.681-.06-.08-.116-.17-.176-.265a2.143 2.143 0 0 0-.533-.642c-.294-.216-.68-.322-1.18-.322a2.482 2.482 0 0 0-2.294 1.536 2.325 2.325 0 0 1 4.002.388.75.75 0 0 0 .836.334c.493-.105.46.36 1.203.518v-.133c-.003-.446-.246-.55-.75-.733zm2.024 1.266a.723.723 0 0 0 .347-.638c-.01-2.957-2.41-5.487-5.37-5.487a5.364 5.364 0 0 0-4.487 2.418c-.01-.026-1.522-2.39-1.538-2.418H8.943l3.463 5.423-3.379 5.32h3.54l1.54-2.366 1.568 2.366h3.541l-3.21-5.052a.7.7 0 0 1-.084-.32 2.69 2.69 0 0 1 2.69-2.691h.001c1.488 0 1.736.89 2.057 1.308.634.826 1.9.464 1.9 1.541a.707.707 0 0 0 1.066.596zm.35.133c-.173.372-.56.338-.755.639-.176.271.114.412.114.412s.337.156.538-.311c.104-.231.14-.488.103-.74z"
|
|
51
|
+
/>
|
|
52
|
+
</svg>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<!-- MIDDLE CONTENT -->
|
|
57
|
+
<div id="middle-content">
|
|
58
|
+
<div id="learning-materials" class="rounded shadow">
|
|
59
|
+
<h2>Learning materials</h2>
|
|
60
|
+
<a href="https://nx.dev/getting-started/intro?utm_source=nx-project" target="_blank" rel="noreferrer" class="list-item-link">
|
|
61
|
+
<svg
|
|
62
|
+
fill="none"
|
|
63
|
+
stroke="currentColor"
|
|
64
|
+
viewBox="0 0 24 24"
|
|
65
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
66
|
+
>
|
|
67
|
+
<path
|
|
68
|
+
stroke-linecap="round"
|
|
69
|
+
stroke-linejoin="round"
|
|
70
|
+
stroke-width="2"
|
|
71
|
+
d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"
|
|
72
|
+
/>
|
|
73
|
+
</svg>
|
|
74
|
+
<span>
|
|
75
|
+
Documentation
|
|
76
|
+
<span> Everything is in there </span>
|
|
77
|
+
</span>
|
|
78
|
+
<svg
|
|
79
|
+
fill="none"
|
|
80
|
+
stroke="currentColor"
|
|
81
|
+
viewBox="0 0 24 24"
|
|
82
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
83
|
+
>
|
|
84
|
+
<path
|
|
85
|
+
stroke-linecap="round"
|
|
86
|
+
stroke-linejoin="round"
|
|
87
|
+
stroke-width="2"
|
|
88
|
+
d="M9 5l7 7-7 7"
|
|
89
|
+
/>
|
|
90
|
+
</svg>
|
|
91
|
+
</a>
|
|
92
|
+
<a href="https://blog.nrwl.io/?utm_source=nx-project" target="_blank" rel="noreferrer" class="list-item-link">
|
|
93
|
+
<svg
|
|
94
|
+
fill="none"
|
|
95
|
+
stroke="currentColor"
|
|
96
|
+
viewBox="0 0 24 24"
|
|
97
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
98
|
+
>
|
|
99
|
+
<path
|
|
100
|
+
stroke-linecap="round"
|
|
101
|
+
stroke-linejoin="round"
|
|
102
|
+
stroke-width="2"
|
|
103
|
+
d="M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z"
|
|
104
|
+
/>
|
|
105
|
+
</svg>
|
|
106
|
+
<span>
|
|
107
|
+
Blog
|
|
108
|
+
<span> Changelog, features & events </span>
|
|
109
|
+
</span>
|
|
110
|
+
<svg
|
|
111
|
+
fill="none"
|
|
112
|
+
stroke="currentColor"
|
|
113
|
+
viewBox="0 0 24 24"
|
|
114
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
115
|
+
>
|
|
116
|
+
<path
|
|
117
|
+
stroke-linecap="round"
|
|
118
|
+
stroke-linejoin="round"
|
|
119
|
+
stroke-width="2"
|
|
120
|
+
d="M9 5l7 7-7 7"
|
|
121
|
+
/>
|
|
122
|
+
</svg>
|
|
123
|
+
</a>
|
|
124
|
+
<a href="https://www.youtube.com/@NxDevtools/videos?utm_source=nx-project&sub_confirmation=1" target="_blank" rel="noreferrer" class="list-item-link">
|
|
125
|
+
<svg
|
|
126
|
+
role="img"
|
|
127
|
+
viewBox="0 0 24 24"
|
|
128
|
+
fill="currentColor"
|
|
129
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
130
|
+
>
|
|
131
|
+
<title>YouTube</title>
|
|
132
|
+
<path
|
|
133
|
+
d="M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"
|
|
134
|
+
/>
|
|
135
|
+
</svg>
|
|
136
|
+
<span>
|
|
137
|
+
YouTube channel
|
|
138
|
+
<span> Nx Show, talks & tutorials </span>
|
|
139
|
+
</span>
|
|
140
|
+
<svg
|
|
141
|
+
fill="none"
|
|
142
|
+
stroke="currentColor"
|
|
143
|
+
viewBox="0 0 24 24"
|
|
144
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
145
|
+
>
|
|
146
|
+
<path
|
|
147
|
+
stroke-linecap="round"
|
|
148
|
+
stroke-linejoin="round"
|
|
149
|
+
stroke-width="2"
|
|
150
|
+
d="M9 5l7 7-7 7"
|
|
151
|
+
/>
|
|
152
|
+
</svg>
|
|
153
|
+
</a>
|
|
154
|
+
<a href="https://nx.dev/react-tutorial/1-code-generation?utm_source=nx-project" target="_blank" rel="noreferrer" class="list-item-link">
|
|
155
|
+
<svg
|
|
156
|
+
fill="none"
|
|
157
|
+
stroke="currentColor"
|
|
158
|
+
viewBox="0 0 24 24"
|
|
159
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
160
|
+
>
|
|
161
|
+
<path
|
|
162
|
+
stroke-linecap="round"
|
|
163
|
+
stroke-linejoin="round"
|
|
164
|
+
stroke-width="2"
|
|
165
|
+
d="M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122"
|
|
166
|
+
/>
|
|
167
|
+
</svg>
|
|
168
|
+
<span>
|
|
169
|
+
Interactive tutorials
|
|
170
|
+
<span> Create an app, step-by-step </span>
|
|
171
|
+
</span>
|
|
172
|
+
<svg
|
|
173
|
+
fill="none"
|
|
174
|
+
stroke="currentColor"
|
|
175
|
+
viewBox="0 0 24 24"
|
|
176
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
177
|
+
>
|
|
178
|
+
<path
|
|
179
|
+
stroke-linecap="round"
|
|
180
|
+
stroke-linejoin="round"
|
|
181
|
+
stroke-width="2"
|
|
182
|
+
d="M9 5l7 7-7 7"
|
|
183
|
+
/>
|
|
184
|
+
</svg>
|
|
185
|
+
</a>
|
|
186
|
+
<a href="https://nxplaybook.com/?utm_source=nx-project" target="_blank" rel="noreferrer" class="list-item-link">
|
|
187
|
+
<svg
|
|
188
|
+
fill="none"
|
|
189
|
+
stroke="currentColor"
|
|
190
|
+
viewBox="0 0 24 24"
|
|
191
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
192
|
+
>
|
|
193
|
+
<path d="M12 14l9-5-9-5-9 5 9 5z" />
|
|
194
|
+
<path
|
|
195
|
+
d="M12 14l6.16-3.422a12.083 12.083 0 01.665 6.479A11.952 11.952 0 0012 20.055a11.952 11.952 0 00-6.824-2.998 12.078 12.078 0 01.665-6.479L12 14z"
|
|
196
|
+
/>
|
|
197
|
+
<path
|
|
198
|
+
stroke-linecap="round"
|
|
199
|
+
stroke-linejoin="round"
|
|
200
|
+
stroke-width="2"
|
|
201
|
+
d="M12 14l9-5-9-5-9 5 9 5zm0 0l6.16-3.422a12.083 12.083 0 01.665 6.479A11.952 11.952 0 0012 20.055a11.952 11.952 0 00-6.824-2.998 12.078 12.078 0 01.665-6.479L12 14zm-4 6v-7.5l4-2.222"
|
|
202
|
+
/>
|
|
203
|
+
</svg>
|
|
204
|
+
<span>
|
|
205
|
+
Video courses
|
|
206
|
+
<span> Nx custom courses </span>
|
|
207
|
+
</span>
|
|
208
|
+
<svg
|
|
209
|
+
fill="none"
|
|
210
|
+
stroke="currentColor"
|
|
211
|
+
viewBox="0 0 24 24"
|
|
212
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
213
|
+
>
|
|
214
|
+
<path
|
|
215
|
+
stroke-linecap="round"
|
|
216
|
+
stroke-linejoin="round"
|
|
217
|
+
stroke-width="2"
|
|
218
|
+
d="M9 5l7 7-7 7"
|
|
219
|
+
/>
|
|
220
|
+
</svg>
|
|
221
|
+
</a>
|
|
222
|
+
</div>
|
|
223
|
+
<div id="other-links">
|
|
224
|
+
<a id="nx-console" class="button-pill rounded shadow" href="https://marketplace.visualstudio.com/items?itemName=nrwl.angular-console&utm_source=nx-project" target="_blank" rel="noreferrer">
|
|
225
|
+
<svg
|
|
226
|
+
fill="currentColor"
|
|
227
|
+
role="img"
|
|
228
|
+
viewBox="0 0 24 24"
|
|
229
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
230
|
+
>
|
|
231
|
+
<title>Visual Studio Code</title>
|
|
232
|
+
<path
|
|
233
|
+
d="M23.15 2.587L18.21.21a1.494 1.494 0 0 0-1.705.29l-9.46 8.63-4.12-3.128a.999.999 0 0 0-1.276.057L.327 7.261A1 1 0 0 0 .326 8.74L3.899 12 .326 15.26a1 1 0 0 0 .001 1.479L1.65 17.94a.999.999 0 0 0 1.276.057l4.12-3.128 9.46 8.63a1.492 1.492 0 0 0 1.704.29l4.942-2.377A1.5 1.5 0 0 0 24 20.06V3.939a1.5 1.5 0 0 0-.85-1.352zm-5.146 14.861L10.826 12l7.178-5.448v10.896z"
|
|
234
|
+
/>
|
|
235
|
+
</svg>
|
|
236
|
+
<span>
|
|
237
|
+
Install Nx Console for VSCode
|
|
238
|
+
<span>The official VSCode extension for Nx.</span>
|
|
239
|
+
</span>
|
|
240
|
+
</a>
|
|
241
|
+
<a
|
|
242
|
+
id="nx-console-jetbrains"
|
|
243
|
+
class="button-pill rounded shadow"
|
|
244
|
+
href="https://plugins.jetbrains.com/plugin/21060-nx-console"
|
|
245
|
+
target="_blank"
|
|
246
|
+
rel="noreferrer"
|
|
247
|
+
>
|
|
248
|
+
<svg
|
|
249
|
+
height="48"
|
|
250
|
+
width="48"
|
|
251
|
+
viewBox="20 20 60 60"
|
|
252
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
253
|
+
>
|
|
254
|
+
<path d="m22.5 22.5h60v60h-60z" />
|
|
255
|
+
<g fill="#fff">
|
|
256
|
+
<path d="m29.03 71.25h22.5v3.75h-22.5z" />
|
|
257
|
+
<path d="m28.09 38 1.67-1.58a1.88 1.88 0 0 0 1.47.87c.64 0 1.06-.44 1.06-1.31v-5.98h2.58v6a3.48 3.48 0 0 1 -.87 2.6 3.56 3.56 0 0 1 -2.57.95 3.84 3.84 0 0 1 -3.34-1.55z" />
|
|
258
|
+
<path d="m36 30h7.53v2.19h-5v1.44h4.49v2h-4.42v1.49h5v2.21h-7.6z" />
|
|
259
|
+
<path d="m47.23 32.29h-2.8v-2.29h8.21v2.27h-2.81v7.1h-2.6z" />
|
|
260
|
+
<path d="m29.13 43.08h4.42a3.53 3.53 0 0 1 2.55.83 2.09 2.09 0 0 1 .6 1.53 2.16 2.16 0 0 1 -1.44 2.09 2.27 2.27 0 0 1 1.86 2.29c0 1.61-1.31 2.59-3.55 2.59h-4.44zm5 2.89c0-.52-.42-.8-1.18-.8h-1.29v1.64h1.24c.79 0 1.25-.26 1.25-.81zm-.9 2.66h-1.57v1.73h1.62c.8 0 1.24-.31 1.24-.86 0-.5-.4-.87-1.27-.87z" />
|
|
261
|
+
<path d="m38 43.08h4.1a4.19 4.19 0 0 1 3 1 2.93 2.93 0 0 1 .9 2.19 3 3 0 0 1 -1.93 2.89l2.24 3.27h-3l-1.88-2.84h-.87v2.84h-2.56zm4 4.5c.87 0 1.39-.43 1.39-1.11 0-.75-.54-1.12-1.4-1.12h-1.44v2.26z" />
|
|
262
|
+
<path d="m49.59 43h2.5l4 9.44h-2.79l-.67-1.69h-3.63l-.67 1.69h-2.71zm2.27 5.73-1-2.65-1.06 2.65z" />
|
|
263
|
+
<path d="m56.46 43.05h2.6v9.37h-2.6z" />
|
|
264
|
+
<path d="m60.06 43.05h2.42l3.37 5v-5h2.57v9.37h-2.26l-3.53-5.14v5.14h-2.57z" />
|
|
265
|
+
<path d="m68.86 51 1.45-1.73a4.84 4.84 0 0 0 3 1.13c.71 0 1.08-.24 1.08-.65 0-.4-.31-.6-1.59-.91-2-.46-3.53-1-3.53-2.93 0-1.74 1.37-3 3.62-3a5.89 5.89 0 0 1 3.86 1.25l-1.26 1.84a4.63 4.63 0 0 0 -2.62-.92c-.63 0-.94.25-.94.6 0 .42.32.61 1.63.91 2.14.46 3.44 1.16 3.44 2.91 0 1.91-1.51 3-3.79 3a6.58 6.58 0 0 1 -4.35-1.5z" />
|
|
266
|
+
</g>
|
|
267
|
+
</svg>
|
|
268
|
+
<span>
|
|
269
|
+
Install Nx Console for JetBrains
|
|
270
|
+
<span>
|
|
271
|
+
Available for WebStorm, Intellij IDEA Ultimate and more!
|
|
272
|
+
</span>
|
|
273
|
+
</span>
|
|
274
|
+
</a>
|
|
275
|
+
<div id="nx-cloud" class="rounded shadow">
|
|
276
|
+
<div>
|
|
277
|
+
<svg id="nx-cloud-logo" role="img" xmlns="http://www.w3.org/2000/svg" stroke="currentColor" fill="transparent" viewBox="0 0 24 24">
|
|
278
|
+
<path stroke-width="2" d="M23 3.75V6.5c-3.036 0-5.5 2.464-5.5 5.5s-2.464 5.5-5.5 5.5-5.5 2.464-5.5 5.5H3.75C2.232 23 1 21.768 1 20.25V3.75C1 2.232 2.232 1 3.75 1h16.5C21.768 1 23 2.232 23 3.75Z" />
|
|
279
|
+
<path stroke-width="2" d="M23 6v14.1667C23 21.7307 21.7307 23 20.1667 23H6c0-3.128 2.53867-5.6667 5.6667-5.6667 3.128 0 5.6666-2.5386 5.6666-5.6666C17.3333 8.53867 19.872 6 23 6Z" />
|
|
280
|
+
</svg>
|
|
281
|
+
<h2>
|
|
282
|
+
Nx Cloud
|
|
283
|
+
<span>
|
|
284
|
+
Enable faster CI & better DX
|
|
285
|
+
</span>
|
|
286
|
+
</h2>
|
|
287
|
+
</div>
|
|
288
|
+
<p>
|
|
289
|
+
You can activate distributed tasks executions and caching by
|
|
290
|
+
running:
|
|
291
|
+
</p>
|
|
292
|
+
<pre>nx connect</pre>
|
|
293
|
+
<a href="https://nx.app/?utm_source=nx-project" target="_blank" rel="noreferrer"> What is Nx Cloud? </a>
|
|
294
|
+
</div>
|
|
295
|
+
<a id="nx-repo" class="button-pill rounded shadow" href="https://github.com/nrwl/nx?utm_source=nx-project" target="_blank" rel="noreferrer">
|
|
296
|
+
<svg
|
|
297
|
+
fill="currentColor"
|
|
298
|
+
role="img"
|
|
299
|
+
viewBox="0 0 24 24"
|
|
300
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
301
|
+
>
|
|
302
|
+
<path
|
|
303
|
+
d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"
|
|
304
|
+
/>
|
|
305
|
+
</svg>
|
|
306
|
+
<span>
|
|
307
|
+
Nx is open source
|
|
308
|
+
<span> Love Nx? Give us a star! </span>
|
|
309
|
+
</span>
|
|
310
|
+
</a>
|
|
311
|
+
</div>
|
|
312
|
+
</div>
|
|
313
|
+
|
|
314
|
+
<!-- COMMANDS -->
|
|
315
|
+
<div id="commands" class="rounded shadow">
|
|
316
|
+
<h2>Next steps</h2>
|
|
317
|
+
<p>Here are some things you can do with Nx:</p>
|
|
318
|
+
<details>
|
|
319
|
+
<summary>
|
|
320
|
+
<svg
|
|
321
|
+
fill="none"
|
|
322
|
+
stroke="currentColor"
|
|
323
|
+
viewBox="0 0 24 24"
|
|
324
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
325
|
+
>
|
|
326
|
+
<path
|
|
327
|
+
stroke-linecap="round"
|
|
328
|
+
stroke-linejoin="round"
|
|
329
|
+
stroke-width="2"
|
|
330
|
+
d="M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
|
|
331
|
+
/>
|
|
332
|
+
</svg>
|
|
333
|
+
Add UI library
|
|
334
|
+
</summary>
|
|
335
|
+
<pre><span># Generate UI lib</span>
|
|
336
|
+
nx g @nx/angular:lib ui
|
|
337
|
+
|
|
338
|
+
<span># Add a component</span>
|
|
339
|
+
nx g @nx/angular:component ui/src/lib/button</pre>
|
|
340
|
+
</details>
|
|
341
|
+
<details>
|
|
342
|
+
<summary>
|
|
343
|
+
<svg
|
|
344
|
+
fill="none"
|
|
345
|
+
stroke="currentColor"
|
|
346
|
+
viewBox="0 0 24 24"
|
|
347
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
348
|
+
>
|
|
349
|
+
<path
|
|
350
|
+
stroke-linecap="round"
|
|
351
|
+
stroke-linejoin="round"
|
|
352
|
+
stroke-width="2"
|
|
353
|
+
d="M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
|
|
354
|
+
/>
|
|
355
|
+
</svg>
|
|
356
|
+
View interactive project graph
|
|
357
|
+
</summary>
|
|
358
|
+
<pre>nx graph</pre>
|
|
359
|
+
</details>
|
|
360
|
+
<details>
|
|
361
|
+
<summary>
|
|
362
|
+
<svg
|
|
363
|
+
fill="none"
|
|
364
|
+
stroke="currentColor"
|
|
365
|
+
viewBox="0 0 24 24"
|
|
366
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
367
|
+
>
|
|
368
|
+
<path
|
|
369
|
+
stroke-linecap="round"
|
|
370
|
+
stroke-linejoin="round"
|
|
371
|
+
stroke-width="2"
|
|
372
|
+
d="M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
|
|
373
|
+
/>
|
|
374
|
+
</svg>
|
|
375
|
+
Run affected commands
|
|
376
|
+
</summary>
|
|
377
|
+
<pre><span># see what's been affected by changes</span>
|
|
378
|
+
nx affected:graph
|
|
379
|
+
|
|
380
|
+
<span># run tests for current changes</span>
|
|
381
|
+
nx affected:test
|
|
382
|
+
|
|
383
|
+
<span># run e2e tests for current changes</span>
|
|
384
|
+
nx affected:e2e</pre>
|
|
385
|
+
</details>
|
|
386
|
+
</div>
|
|
387
|
+
|
|
388
|
+
<p id="love">
|
|
389
|
+
Carefully crafted with
|
|
390
|
+
<svg
|
|
391
|
+
fill="currentColor"
|
|
392
|
+
stroke="none"
|
|
393
|
+
viewBox="0 0 24 24"
|
|
394
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
395
|
+
>
|
|
396
|
+
<path
|
|
397
|
+
stroke-linecap="round"
|
|
398
|
+
stroke-linejoin="round"
|
|
399
|
+
stroke-width="2"
|
|
400
|
+
d="M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"
|
|
401
|
+
/>
|
|
402
|
+
</svg>
|
|
403
|
+
</p>
|
|
404
|
+
</div>
|
|
405
|
+
</div>
|
|
406
|
+
`;
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
customElements.define('<%= prefix %>-root', AppElement);
|
|
File without changes
|
|
Binary file
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<title><%= className %></title>
|
|
6
|
+
<base href="/" />
|
|
7
|
+
|
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
9
|
+
<link rel="icon" type="image/x-icon" href="favicon.ico" />
|
|
10
|
+
</head>
|
|
11
|
+
<body>
|
|
12
|
+
<<%= prefix %>-root></<%= prefix %>-root>
|
|
13
|
+
</body>
|
|
14
|
+
</html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './app/app.element';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/* You can add global styles to this file, and also import other style files */
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<% if (webpackPluginOptions) { %>
|
|
2
|
+
const { NxWebpackPlugin } = require('@nx/webpack');
|
|
3
|
+
const { join } = require('path');
|
|
4
|
+
|
|
5
|
+
module.exports = {
|
|
6
|
+
output: {
|
|
7
|
+
path: join(__dirname, '<%= offsetFromRoot %><%= webpackPluginOptions.outputPath %>'),
|
|
8
|
+
},
|
|
9
|
+
devServer: {
|
|
10
|
+
port: 4200
|
|
11
|
+
},
|
|
12
|
+
plugins: [
|
|
13
|
+
new NxWebpackPlugin({
|
|
14
|
+
tsConfig: '<%= webpackPluginOptions.tsConfig %>',
|
|
15
|
+
compiler: '<%= webpackPluginOptions.compiler %>',
|
|
16
|
+
main: '<%= webpackPluginOptions.main %>',
|
|
17
|
+
index: '<%= webpackPluginOptions.index %>',
|
|
18
|
+
baseHref: '<%= webpackPluginOptions.baseHref %>',
|
|
19
|
+
assets: <%- JSON.stringify(webpackPluginOptions.assets) %>,
|
|
20
|
+
styles: <%- JSON.stringify(webpackPluginOptions.styles) %>,
|
|
21
|
+
outputHashing: process.env['NODE_ENV'] === 'production' ? 'all' : 'none',
|
|
22
|
+
optimization: process.env['NODE_ENV'] === 'production',
|
|
23
|
+
})
|
|
24
|
+
],
|
|
25
|
+
};
|
|
26
|
+
<% } else { %>
|
|
27
|
+
const { composePlugins, withNx, withWeb } = require('@nx/webpack');
|
|
28
|
+
|
|
29
|
+
// Nx plugins for webpack.
|
|
30
|
+
module.exports = composePlugins(
|
|
31
|
+
withNx(),
|
|
32
|
+
withWeb(),
|
|
33
|
+
(config) => {
|
|
34
|
+
// Update the webpack config as needed here.
|
|
35
|
+
// e.g. `config.plugins.push(new MyPlugin())`
|
|
36
|
+
return config;
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
<% } %>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils';
|
|
2
|
+
import type { Linter } from '@nx/eslint';
|
|
3
|
+
|
|
4
|
+
export interface Schema {
|
|
5
|
+
name: string;
|
|
6
|
+
prefix?: string;
|
|
7
|
+
style?: string;
|
|
8
|
+
bundler?: 'webpack' | 'none' | 'vite';
|
|
9
|
+
compiler?: 'babel' | 'swc';
|
|
10
|
+
skipFormat?: boolean;
|
|
11
|
+
directory?: string;
|
|
12
|
+
projectNameAndRootFormat?: ProjectNameAndRootFormat;
|
|
13
|
+
tags?: string;
|
|
14
|
+
unitTestRunner?: 'jest' | 'vitest' | 'none';
|
|
15
|
+
inSourceTests?: boolean;
|
|
16
|
+
e2eTestRunner?: 'cypress' | 'playwright' | 'none';
|
|
17
|
+
linter?: Linter;
|
|
18
|
+
standaloneConfig?: boolean;
|
|
19
|
+
setParserOptionsProject?: boolean;
|
|
20
|
+
addPlugin?: boolean;
|
|
21
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"cli": "nx",
|
|
4
|
+
"$id": "NxWebApp",
|
|
5
|
+
"title": "Create a Web Application for Nx",
|
|
6
|
+
"description": "Create a web application using `swc` or `babel` as compiler.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"name": {
|
|
10
|
+
"description": "The name of the application.",
|
|
11
|
+
"type": "string",
|
|
12
|
+
"$default": {
|
|
13
|
+
"$source": "argv",
|
|
14
|
+
"index": 0
|
|
15
|
+
},
|
|
16
|
+
"x-prompt": "What name would you like to use for the application?",
|
|
17
|
+
"pattern": "^[a-zA-Z][^:]*$"
|
|
18
|
+
},
|
|
19
|
+
"directory": {
|
|
20
|
+
"description": "The directory of the new application.",
|
|
21
|
+
"type": "string"
|
|
22
|
+
},
|
|
23
|
+
"projectNameAndRootFormat": {
|
|
24
|
+
"description": "Whether to generate the project name and root directory as provided (`as-provided`) or generate them composing their values and taking the configured layout into account (`derived`).",
|
|
25
|
+
"type": "string",
|
|
26
|
+
"enum": ["as-provided", "derived"]
|
|
27
|
+
},
|
|
28
|
+
"style": {
|
|
29
|
+
"description": "The file extension to be used for style files.",
|
|
30
|
+
"type": "string",
|
|
31
|
+
"default": "css",
|
|
32
|
+
"x-prompt": {
|
|
33
|
+
"message": "Which stylesheet format would you like to use?",
|
|
34
|
+
"type": "list",
|
|
35
|
+
"items": [
|
|
36
|
+
{
|
|
37
|
+
"value": "css",
|
|
38
|
+
"label": "CSS"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"value": "scss",
|
|
42
|
+
"label": "SASS(.scss) [ https://sass-lang.com ]"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"value": "less",
|
|
46
|
+
"label": "LESS [ https://lesscss.org ]"
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"compiler": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"description": "The compiler to use",
|
|
54
|
+
"enum": ["swc", "babel"],
|
|
55
|
+
"default": "swc",
|
|
56
|
+
"x-priority": "important"
|
|
57
|
+
},
|
|
58
|
+
"bundler": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"description": "The bundler to use.",
|
|
61
|
+
"enum": ["webpack", "none", "vite"],
|
|
62
|
+
"default": "webpack",
|
|
63
|
+
"x-prompt": "Which bundler do you want to use?",
|
|
64
|
+
"x-priority": "important"
|
|
65
|
+
},
|
|
66
|
+
"linter": {
|
|
67
|
+
"description": "The tool to use for running lint checks.",
|
|
68
|
+
"type": "string",
|
|
69
|
+
"enum": ["eslint", "none"],
|
|
70
|
+
"default": "eslint"
|
|
71
|
+
},
|
|
72
|
+
"skipFormat": {
|
|
73
|
+
"description": "Skip formatting files",
|
|
74
|
+
"type": "boolean",
|
|
75
|
+
"default": false,
|
|
76
|
+
"x-priority": "internal"
|
|
77
|
+
},
|
|
78
|
+
"unitTestRunner": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"enum": ["jest", "vitest", "none"],
|
|
81
|
+
"description": "Test runner to use for unit tests. Default value is 'jest' when using 'webpack' or 'none' as the bundler and 'vitest' when using 'vite' as the bundler"
|
|
82
|
+
},
|
|
83
|
+
"inSourceTests": {
|
|
84
|
+
"type": "boolean",
|
|
85
|
+
"default": false,
|
|
86
|
+
"description": "When using Vitest, separate spec files will not be generated and instead will be included within the source files."
|
|
87
|
+
},
|
|
88
|
+
"e2eTestRunner": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"enum": ["cypress", "playwright", "none"],
|
|
91
|
+
"x-prompt": "Which E2E test runner would you like to use?",
|
|
92
|
+
"description": "Test runner to use for end to end (e2e) tests",
|
|
93
|
+
"default": "cypress"
|
|
94
|
+
},
|
|
95
|
+
"tags": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"description": "Add tags to the application (used for linting)"
|
|
98
|
+
},
|
|
99
|
+
"setParserOptionsProject": {
|
|
100
|
+
"type": "boolean",
|
|
101
|
+
"description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
|
|
102
|
+
"default": false
|
|
103
|
+
},
|
|
104
|
+
"standaloneConfig": {
|
|
105
|
+
"description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside workspace.json",
|
|
106
|
+
"type": "boolean",
|
|
107
|
+
"default": true,
|
|
108
|
+
"x-deprecated": "Nx only supports standaloneConfig"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"required": ["name"],
|
|
112
|
+
"examplesFile": "../../../docs/application-examples.md"
|
|
113
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.webInitGenerator = void 0;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const versions_1 = require("../../utils/versions");
|
|
6
|
+
function updateDependencies(tree, schema) {
|
|
7
|
+
const tasks = [];
|
|
8
|
+
tasks.push((0, devkit_1.removeDependenciesFromPackageJson)(tree, ['@nx/web'], []));
|
|
9
|
+
tasks.push((0, devkit_1.addDependenciesToPackageJson)(tree, {}, { '@nx/web': versions_1.nxVersion }, undefined, schema.keepExistingVersions));
|
|
10
|
+
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
11
|
+
}
|
|
12
|
+
async function webInitGenerator(tree, schema) {
|
|
13
|
+
let installTask = () => { };
|
|
14
|
+
if (!schema.skipPackageJson) {
|
|
15
|
+
installTask = updateDependencies(tree, schema);
|
|
16
|
+
}
|
|
17
|
+
if (!schema.skipFormat) {
|
|
18
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
19
|
+
}
|
|
20
|
+
return installTask;
|
|
21
|
+
}
|
|
22
|
+
exports.webInitGenerator = webInitGenerator;
|
|
23
|
+
exports.default = webInitGenerator;
|