@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.
Files changed (73) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +68 -0
  3. package/babel.d.ts +1 -0
  4. package/babel.js +6 -0
  5. package/executors.json +16 -0
  6. package/generators.json +25 -0
  7. package/index.d.ts +3 -0
  8. package/index.js +9 -0
  9. package/migrations.json +51 -0
  10. package/package.json +45 -0
  11. package/src/executors/file-server/compat.d.ts +2 -0
  12. package/src/executors/file-server/compat.js +5 -0
  13. package/src/executors/file-server/file-server.impl.d.ts +8 -0
  14. package/src/executors/file-server/file-server.impl.js +210 -0
  15. package/src/executors/file-server/schema.d.ts +20 -0
  16. package/src/executors/file-server/schema.json +98 -0
  17. package/src/generators/application/application.d.ts +5 -0
  18. package/src/generators/application/application.js +353 -0
  19. package/src/generators/application/files/app-vite/.babelrc__tmpl__ +5 -0
  20. package/src/generators/application/files/app-vite/index.html__tmpl__ +16 -0
  21. package/src/generators/application/files/app-vite/public/favicon.ico +0 -0
  22. package/src/generators/application/files/app-vite/src/app/app.element.__style__ +424 -0
  23. package/src/generators/application/files/app-vite/src/app/app.element.spec.ts__tmpl__ +21 -0
  24. package/src/generators/application/files/app-vite/src/app/app.element.ts__tmpl__ +409 -0
  25. package/src/generators/application/files/app-vite/src/assets/.gitkeep +0 -0
  26. package/src/generators/application/files/app-vite/src/main.ts__tmpl__ +1 -0
  27. package/src/generators/application/files/app-vite/src/styles.__style__ +1 -0
  28. package/src/generators/application/files/app-vite/tsconfig.app.json +9 -0
  29. package/src/generators/application/files/app-vite/tsconfig.json__tmpl__ +27 -0
  30. package/src/generators/application/files/app-webpack/src/app/app.element.__style__ +424 -0
  31. package/src/generators/application/files/app-webpack/src/app/app.element.spec.ts__tmpl__ +21 -0
  32. package/src/generators/application/files/app-webpack/src/app/app.element.ts__tmpl__ +409 -0
  33. package/src/generators/application/files/app-webpack/src/assets/.gitkeep +0 -0
  34. package/src/generators/application/files/app-webpack/src/favicon.ico +0 -0
  35. package/src/generators/application/files/app-webpack/src/index.html +14 -0
  36. package/src/generators/application/files/app-webpack/src/main.ts__tmpl__ +1 -0
  37. package/src/generators/application/files/app-webpack/src/styles.__style__ +1 -0
  38. package/src/generators/application/files/app-webpack/tsconfig.app.json +9 -0
  39. package/src/generators/application/files/app-webpack/tsconfig.json +10 -0
  40. package/src/generators/application/files/app-webpack/webpack.config.js__tmpl__ +39 -0
  41. package/src/generators/application/schema.d.ts +21 -0
  42. package/src/generators/application/schema.json +113 -0
  43. package/src/generators/init/init.d.ts +4 -0
  44. package/src/generators/init/init.js +23 -0
  45. package/src/generators/init/schema.d.ts +5 -0
  46. package/src/generators/init/schema.json +28 -0
  47. package/src/generators/static-serve/schema.json +24 -0
  48. package/src/generators/static-serve/static-serve-configuration.d.ts +8 -0
  49. package/src/generators/static-serve/static-serve-configuration.js +73 -0
  50. package/src/migrations/update-15-0-0/add-babel-inputs.d.ts +2 -0
  51. package/src/migrations/update-15-0-0/add-babel-inputs.js +9 -0
  52. package/src/migrations/update-15-0-0/update-rollup-executor.d.ts +2 -0
  53. package/src/migrations/update-15-0-0/update-rollup-executor.js +33 -0
  54. package/src/migrations/update-15-5-4/update-babel-preset.d.ts +2 -0
  55. package/src/migrations/update-15-5-4/update-babel-preset.js +32 -0
  56. package/src/migrations/update-15-9-1/add-dropped-dependencies.d.ts +2 -0
  57. package/src/migrations/update-15-9-1/add-dropped-dependencies.js +35 -0
  58. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +2 -0
  59. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +9 -0
  60. package/src/migrations/update-16-0-0-update-executors/update-16-0-0-update-executors.d.ts +2 -0
  61. package/src/migrations/update-16-0-0-update-executors/update-16-0-0-update-executors.js +34 -0
  62. package/src/plugins/webpack-nx-build-coordination-plugin.d.ts +1 -0
  63. package/src/plugins/webpack-nx-build-coordination-plugin.js +5 -0
  64. package/src/utils/fs.d.ts +1 -0
  65. package/src/utils/fs.js +4 -0
  66. package/src/utils/has-webpack-plugin.d.ts +2 -0
  67. package/src/utils/has-webpack-plugin.js +11 -0
  68. package/src/utils/normalize.d.ts +1 -0
  69. package/src/utils/normalize.js +4 -0
  70. package/src/utils/versions.d.ts +4 -0
  71. package/src/utils/versions.js +7 -0
  72. package/src/utils/wait-for-port-open.d.ts +5 -0
  73. package/src/utils/wait-for-port-open.js +45 -0
@@ -0,0 +1,424 @@
1
+ /*
2
+ * Remove template code below
3
+ */
4
+ html {
5
+ -webkit-text-size-adjust: 100%;
6
+ font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
7
+ 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif,
8
+ 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
9
+ 'Noto Color Emoji';
10
+ line-height: 1.5;
11
+ tab-size: 4;
12
+ scroll-behavior: smooth;
13
+ }
14
+ body {
15
+ font-family: inherit;
16
+ line-height: inherit;
17
+ margin: 0;
18
+ }
19
+ h1,
20
+ h2,
21
+ p,
22
+ pre {
23
+ margin: 0;
24
+ }
25
+ *,
26
+ ::before,
27
+ ::after {
28
+ box-sizing: border-box;
29
+ border-width: 0;
30
+ border-style: solid;
31
+ border-color: currentColor;
32
+ }
33
+ h1,
34
+ h2 {
35
+ font-size: inherit;
36
+ font-weight: inherit;
37
+ }
38
+ a {
39
+ color: inherit;
40
+ text-decoration: inherit;
41
+ }
42
+ pre {
43
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
44
+ 'Liberation Mono', 'Courier New', monospace;
45
+ }
46
+ svg {
47
+ display: block;
48
+ vertical-align: middle;
49
+ }
50
+
51
+ svg {
52
+ shape-rendering: auto;
53
+ text-rendering: optimizeLegibility;
54
+ }
55
+ pre {
56
+ background-color: rgba(55, 65, 81, 1);
57
+ border-radius: 0.25rem;
58
+ color: rgba(229, 231, 235, 1);
59
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
60
+ 'Liberation Mono', 'Courier New', monospace;
61
+ overflow: scroll;
62
+ padding: 0.5rem 0.75rem;
63
+ }
64
+
65
+ .shadow {
66
+ box-shadow: 0 0 #0000, 0 0 #0000, 0 10px 15px -3px rgba(0, 0, 0, 0.1),
67
+ 0 4px 6px -2px rgba(0, 0, 0, 0.05);
68
+ }
69
+ .rounded {
70
+ border-radius: 1.5rem;
71
+ }
72
+
73
+ .wrapper {
74
+ width: 100%;
75
+ }
76
+ .container {
77
+ margin-left: auto;
78
+ margin-right: auto;
79
+ max-width: 768px;
80
+ padding-bottom: 3rem;
81
+ padding-left: 1rem;
82
+ padding-right: 1rem;
83
+ color: rgba(55, 65, 81, 1);
84
+ width: 100%;
85
+ }
86
+ #welcome {
87
+ margin-top: 2.5rem;
88
+ }
89
+ #welcome h1 {
90
+ font-size: 3rem;
91
+ font-weight: 500;
92
+ letter-spacing: -0.025em;
93
+ line-height: 1;
94
+ }
95
+ #welcome span {
96
+ display: block;
97
+ font-size: 1.875rem;
98
+ font-weight: 300;
99
+ line-height: 2.25rem;
100
+ margin-bottom: 0.5rem;
101
+ }
102
+ #hero {
103
+ align-items: center;
104
+ background-color: hsla(214, 62%, 21%, 1);
105
+ border: none;
106
+ box-sizing: border-box;
107
+ color: rgba(55, 65, 81, 1);
108
+ display: grid;
109
+ grid-template-columns: 1fr;
110
+ margin-top: 3.5rem;
111
+ }
112
+ #hero .text-container {
113
+ color: rgba(255, 255, 255, 1);
114
+ padding: 3rem 2rem;
115
+ }
116
+ #hero .text-container h2 {
117
+ font-size: 1.5rem;
118
+ line-height: 2rem;
119
+ position: relative;
120
+ }
121
+ #hero .text-container h2 svg {
122
+ color: hsla(162, 47%, 50%, 1);
123
+ height: 2rem;
124
+ left: -0.25rem;
125
+ position: absolute;
126
+ top: 0;
127
+ width: 2rem;
128
+ }
129
+ #hero .text-container h2 span {
130
+ margin-left: 2.5rem;
131
+ }
132
+ #hero .text-container a {
133
+ background-color: rgba(255, 255, 255, 1);
134
+ border-radius: 0.75rem;
135
+ color: rgba(55, 65, 81, 1);
136
+ display: inline-block;
137
+ margin-top: 1.5rem;
138
+ padding: 1rem 2rem;
139
+ text-decoration: inherit;
140
+ }
141
+ #hero .logo-container {
142
+ display: none;
143
+ justify-content: center;
144
+ padding-left: 2rem;
145
+ padding-right: 2rem;
146
+ }
147
+ #hero .logo-container svg {
148
+ color: rgba(255, 255, 255, 1);
149
+ width: 66.666667%;
150
+ }
151
+
152
+ #middle-content {
153
+ align-items: flex-start;
154
+ display: grid;
155
+ gap: 4rem;
156
+ grid-template-columns: 1fr;
157
+ margin-top: 3.5rem;
158
+ }
159
+
160
+ #learning-materials {
161
+ padding: 2.5rem 2rem;
162
+ }
163
+ #learning-materials h2 {
164
+ font-weight: 500;
165
+ font-size: 1.25rem;
166
+ letter-spacing: -0.025em;
167
+ line-height: 1.75rem;
168
+ padding-left: 1rem;
169
+ padding-right: 1rem;
170
+ }
171
+ .list-item-link {
172
+ align-items: center;
173
+ border-radius: 0.75rem;
174
+ display: flex;
175
+ margin-top: 1rem;
176
+ padding: 1rem;
177
+ transition-property: background-color, border-color, color, fill, stroke,
178
+ opacity, box-shadow, transform, filter, backdrop-filter,
179
+ -webkit-backdrop-filter;
180
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
181
+ transition-duration: 150ms;
182
+ width: 100%;
183
+ }
184
+ .list-item-link svg:first-child {
185
+ margin-right: 1rem;
186
+ height: 1.5rem;
187
+ transition-property: background-color, border-color, color, fill, stroke,
188
+ opacity, box-shadow, transform, filter, backdrop-filter,
189
+ -webkit-backdrop-filter;
190
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
191
+ transition-duration: 150ms;
192
+ width: 1.5rem;
193
+ }
194
+ .list-item-link > span {
195
+ flex-grow: 1;
196
+ font-weight: 400;
197
+ transition-property: background-color, border-color, color, fill, stroke,
198
+ opacity, box-shadow, transform, filter, backdrop-filter,
199
+ -webkit-backdrop-filter;
200
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
201
+ transition-duration: 150ms;
202
+ }
203
+ .list-item-link > span > span {
204
+ color: rgba(107, 114, 128, 1);
205
+ display: block;
206
+ flex-grow: 1;
207
+ font-size: 0.75rem;
208
+ font-weight: 300;
209
+ line-height: 1rem;
210
+ transition-property: background-color, border-color, color, fill, stroke,
211
+ opacity, box-shadow, transform, filter, backdrop-filter,
212
+ -webkit-backdrop-filter;
213
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
214
+ transition-duration: 150ms;
215
+ }
216
+ .list-item-link svg:last-child {
217
+ height: 1rem;
218
+ transition-property: all;
219
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
220
+ transition-duration: 150ms;
221
+ width: 1rem;
222
+ }
223
+ .list-item-link:hover {
224
+ color: rgba(255, 255, 255, 1);
225
+ background-color: hsla(162, 47%, 50%, 1);
226
+ }
227
+ .list-item-link:hover > span {
228
+ }
229
+ .list-item-link:hover > span > span {
230
+ color: rgba(243, 244, 246, 1);
231
+ }
232
+ .list-item-link:hover svg:last-child {
233
+ transform: translateX(0.25rem);
234
+ }
235
+
236
+ #other-links {
237
+ }
238
+ .button-pill {
239
+ padding: 1.5rem 2rem;
240
+ transition-duration: 300ms;
241
+ transition-property: background-color, border-color, color, fill, stroke,
242
+ opacity, box-shadow, transform, filter, backdrop-filter,
243
+ -webkit-backdrop-filter;
244
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
245
+ align-items: center;
246
+ display: flex;
247
+ }
248
+ .button-pill svg {
249
+ transition-property: background-color, border-color, color, fill, stroke,
250
+ opacity, box-shadow, transform, filter, backdrop-filter,
251
+ -webkit-backdrop-filter;
252
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
253
+ transition-duration: 150ms;
254
+ flex-shrink: 0;
255
+ width: 3rem;
256
+ }
257
+ .button-pill > span {
258
+ letter-spacing: -0.025em;
259
+ font-weight: 400;
260
+ font-size: 1.125rem;
261
+ line-height: 1.75rem;
262
+ padding-left: 1rem;
263
+ padding-right: 1rem;
264
+ }
265
+ .button-pill span span {
266
+ display: block;
267
+ font-size: 0.875rem;
268
+ font-weight: 300;
269
+ line-height: 1.25rem;
270
+ }
271
+ .button-pill:hover svg,
272
+ .button-pill:hover {
273
+ color: rgba(255, 255, 255, 1) !important;
274
+ }
275
+ #nx-console:hover {
276
+ background-color: rgba(0, 122, 204, 1);
277
+ }
278
+ #nx-console svg {
279
+ color: rgba(0, 122, 204, 1);
280
+ }
281
+ #nx-console-jetbrains {
282
+ margin-top: 2rem;
283
+ }
284
+ #nx-console-jetbrains:hover {
285
+ background-color: rgba(255, 49, 140, 1);
286
+ }
287
+ #nx-console-jetbrains svg {
288
+ color: rgba(255, 49, 140, 1);
289
+ }
290
+ #nx-repo:hover {
291
+ background-color: rgba(24, 23, 23, 1);
292
+ }
293
+ #nx-repo svg {
294
+ color: rgba(24, 23, 23, 1);
295
+ }
296
+
297
+ #nx-cloud {
298
+ margin-bottom: 2rem;
299
+ margin-top: 2rem;
300
+ padding: 2.5rem 2rem;
301
+ }
302
+ #nx-cloud > div {
303
+ align-items: center;
304
+ display: flex;
305
+ }
306
+ #nx-cloud > div svg {
307
+ border-radius: 0.375rem;
308
+ flex-shrink: 0;
309
+ width: 3rem;
310
+ }
311
+ #nx-cloud > div h2 {
312
+ font-size: 1.125rem;
313
+ font-weight: 400;
314
+ letter-spacing: -0.025em;
315
+ line-height: 1.75rem;
316
+ padding-left: 1rem;
317
+ padding-right: 1rem;
318
+ }
319
+ #nx-cloud > div h2 span {
320
+ display: block;
321
+ font-size: 0.875rem;
322
+ font-weight: 300;
323
+ line-height: 1.25rem;
324
+ }
325
+ #nx-cloud p {
326
+ font-size: 1rem;
327
+ line-height: 1.5rem;
328
+ margin-top: 1rem;
329
+ }
330
+ #nx-cloud pre {
331
+ margin-top: 1rem;
332
+ }
333
+ #nx-cloud a {
334
+ color: rgba(107, 114, 128, 1);
335
+ display: block;
336
+ font-size: 0.875rem;
337
+ line-height: 1.25rem;
338
+ margin-top: 1.5rem;
339
+ text-align: right;
340
+ }
341
+ #nx-cloud a:hover {
342
+ text-decoration: underline;
343
+ }
344
+
345
+ #commands {
346
+ padding: 2.5rem 2rem;
347
+
348
+ margin-top: 3.5rem;
349
+ }
350
+ #commands h2 {
351
+ font-size: 1.25rem;
352
+ font-weight: 400;
353
+ letter-spacing: -0.025em;
354
+ line-height: 1.75rem;
355
+ padding-left: 1rem;
356
+ padding-right: 1rem;
357
+ }
358
+ #commands p {
359
+ font-size: 1rem;
360
+ font-weight: 300;
361
+ line-height: 1.5rem;
362
+ margin-top: 1rem;
363
+ padding-left: 1rem;
364
+ padding-right: 1rem;
365
+ }
366
+ details {
367
+ align-items: center;
368
+ display: flex;
369
+ margin-top: 1rem;
370
+ padding-left: 1rem;
371
+ padding-right: 1rem;
372
+ width: 100%;
373
+ }
374
+ details pre > span {
375
+ color: rgba(181, 181, 181, 1);
376
+ }
377
+ summary {
378
+ border-radius: 0.5rem;
379
+ display: flex;
380
+ font-weight: 400;
381
+ padding: 0.5rem;
382
+ cursor: pointer;
383
+ transition-property: background-color, border-color, color, fill, stroke,
384
+ opacity, box-shadow, transform, filter, backdrop-filter,
385
+ -webkit-backdrop-filter;
386
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
387
+ transition-duration: 150ms;
388
+ }
389
+ summary:hover {
390
+ background-color: rgba(243, 244, 246, 1);
391
+ }
392
+ summary svg {
393
+ height: 1.5rem;
394
+ margin-right: 1rem;
395
+ width: 1.5rem;
396
+ }
397
+
398
+ #love {
399
+ color: rgba(107, 114, 128, 1);
400
+ font-size: 0.875rem;
401
+ line-height: 1.25rem;
402
+ margin-top: 3.5rem;
403
+ opacity: 0.6;
404
+ text-align: center;
405
+ }
406
+ #love svg {
407
+ color: rgba(252, 165, 165, 1);
408
+ width: 1.25rem;
409
+ height: 1.25rem;
410
+ display: inline;
411
+ margin-top: -0.25rem;
412
+ }
413
+
414
+ @media screen and (min-width: 768px) {
415
+ #hero {
416
+ grid-template-columns: repeat(2, minmax(0, 1fr));
417
+ }
418
+ #hero .logo-container {
419
+ display: flex;
420
+ }
421
+ #middle-content {
422
+ grid-template-columns: repeat(2, minmax(0, 1fr));
423
+ }
424
+ }
@@ -0,0 +1,21 @@
1
+ import { AppElement } from './app.element';
2
+
3
+ describe('AppElement', () => {
4
+ let app: AppElement;
5
+
6
+ beforeEach(() => {
7
+ app = new AppElement();
8
+ });
9
+
10
+ it('should create successfully', () => {
11
+ expect(app).toBeTruthy();
12
+ });
13
+
14
+ it('should have a greeting', () => {
15
+ app.connectedCallback();
16
+
17
+ expect(app.querySelector('h1').innerHTML).toContain(
18
+ 'Welcome <%= projectName %>'
19
+ );
20
+ });
21
+ });