@nx/remix 16.1.2 → 16.2.0-beta.2
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/package.json +2 -2
- package/src/generators/application/__snapshots__/application.impl.spec.ts.snap +517 -0
- package/src/generators/application/application.impl.js +32 -11
- package/src/generators/application/application.impl.js.map +1 -1
- package/src/generators/application/files/common/remix.config.js__tmpl__ +2 -2
- package/src/generators/application/files/common/tsconfig.json__tmpl__ +2 -2
- package/src/generators/application/files/integrated/package.json__tmpl__ +1 -6
- package/src/generators/application/lib/index.d.ts +1 -0
- package/src/generators/application/lib/index.js +5 -0
- package/src/generators/application/lib/index.js.map +1 -0
- package/src/generators/application/lib/normalize-options.js +8 -4
- package/src/generators/application/lib/normalize-options.js.map +1 -1
- package/src/generators/application/schema.d.ts +2 -0
- package/src/generators/application/schema.json +11 -0
- package/src/generators/library/lib/add-tsconfig-entry-points.d.ts +3 -0
- package/src/generators/library/lib/add-tsconfig-entry-points.js +20 -0
- package/src/generators/library/lib/add-tsconfig-entry-points.js.map +1 -0
- package/src/generators/library/lib/index.d.ts +3 -0
- package/src/generators/library/lib/index.js +7 -0
- package/src/generators/library/lib/index.js.map +1 -0
- package/src/generators/library/lib/normalize-options.d.ts +6 -0
- package/src/generators/library/lib/normalize-options.js +20 -0
- package/src/generators/library/lib/normalize-options.js.map +1 -0
- package/src/generators/library/lib/update-buildable-config.d.ts +2 -0
- package/src/generators/library/lib/update-buildable-config.js +18 -0
- package/src/generators/library/lib/update-buildable-config.js.map +1 -0
- package/src/generators/library/library.impl.d.ts +4 -3
- package/src/generators/library/library.impl.js +14 -34
- package/src/generators/library/library.impl.js.map +1 -1
- package/src/generators/library/schema.d.ts +4 -1
- package/src/generators/library/schema.json +24 -2
- package/src/index.d.ts +1 -0
- package/src/index.js +3 -0
- package/src/index.js.map +1 -1
- package/src/utils/create-watch-paths.d.ts +8 -0
- package/src/utils/create-watch-paths.js +45 -0
- package/src/utils/create-watch-paths.js.map +1 -0
- package/src/utils/project.d.ts +2 -0
- package/src/utils/project.js +15 -0
- package/src/utils/project.js.map +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/remix",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.2.0-beta.2",
|
|
4
4
|
"main": "src/index.js",
|
|
5
5
|
"generators": "./generators.json",
|
|
6
6
|
"dependencies": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"@nx/js": "^16.0.3",
|
|
9
9
|
"@nx/react": "^16.0.3",
|
|
10
10
|
"tslib": "^2.3.1",
|
|
11
|
-
"@nrwl/remix": "16.
|
|
11
|
+
"@nrwl/remix": "16.2.0-beta.2"
|
|
12
12
|
},
|
|
13
13
|
"ng-update": {
|
|
14
14
|
"requirements": {},
|
|
@@ -0,0 +1,517 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`Remix Application Integrated Repo --directory should create the application correctly 1`] = `
|
|
4
|
+
"/**
|
|
5
|
+
* @type {import('@remix-run/dev').AppConfig}
|
|
6
|
+
*/
|
|
7
|
+
module.exports = {
|
|
8
|
+
ignoredRouteFiles: ['**/.*'],
|
|
9
|
+
// appDirectory: \\"app\\",
|
|
10
|
+
// assetsBuildDirectory: \\"public/build\\",
|
|
11
|
+
// serverBuildPath: \\"build/index.js\\",
|
|
12
|
+
// publicPath: \\"/build/\\",
|
|
13
|
+
watchPaths: () => require('@nx/remix').createWatchPaths(__dirname),
|
|
14
|
+
};
|
|
15
|
+
"
|
|
16
|
+
`;
|
|
17
|
+
|
|
18
|
+
exports[`Remix Application Integrated Repo --directory should create the application correctly 2`] = `
|
|
19
|
+
"import type { MetaFunction } from '@remix-run/node';
|
|
20
|
+
import {
|
|
21
|
+
Links,
|
|
22
|
+
LiveReload,
|
|
23
|
+
Meta,
|
|
24
|
+
Outlet,
|
|
25
|
+
Scripts,
|
|
26
|
+
ScrollRestoration,
|
|
27
|
+
} from '@remix-run/react';
|
|
28
|
+
|
|
29
|
+
export const meta: MetaFunction = () => ({
|
|
30
|
+
charset: 'utf-8',
|
|
31
|
+
title: 'New Remix App',
|
|
32
|
+
viewport: 'width=device-width,initial-scale=1',
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
export default function App() {
|
|
36
|
+
return (
|
|
37
|
+
<html lang=\\"en\\">
|
|
38
|
+
<head>
|
|
39
|
+
<Meta />
|
|
40
|
+
<Links />
|
|
41
|
+
</head>
|
|
42
|
+
<body>
|
|
43
|
+
<Outlet />
|
|
44
|
+
<ScrollRestoration />
|
|
45
|
+
<Scripts />
|
|
46
|
+
<LiveReload />
|
|
47
|
+
</body>
|
|
48
|
+
</html>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
"
|
|
52
|
+
`;
|
|
53
|
+
|
|
54
|
+
exports[`Remix Application Integrated Repo --directory should create the application correctly 3`] = `
|
|
55
|
+
"export default function Index() {
|
|
56
|
+
return (
|
|
57
|
+
<div style={{ fontFamily: 'system-ui, sans-serif', lineHeight: '1.4' }}>
|
|
58
|
+
<h1>Welcome to Remix</h1>
|
|
59
|
+
<ul>
|
|
60
|
+
<li>
|
|
61
|
+
<a
|
|
62
|
+
target=\\"_blank\\"
|
|
63
|
+
href=\\"https://remix.run/tutorials/blog\\"
|
|
64
|
+
rel=\\"noreferrer\\"
|
|
65
|
+
>
|
|
66
|
+
15m Quickstart Blog Tutorial
|
|
67
|
+
</a>
|
|
68
|
+
</li>
|
|
69
|
+
<li>
|
|
70
|
+
<a
|
|
71
|
+
target=\\"_blank\\"
|
|
72
|
+
href=\\"https://remix.run/tutorials/jokes\\"
|
|
73
|
+
rel=\\"noreferrer\\"
|
|
74
|
+
>
|
|
75
|
+
Deep Dive Jokes App Tutorial
|
|
76
|
+
</a>
|
|
77
|
+
</li>
|
|
78
|
+
<li>
|
|
79
|
+
<a target=\\"_blank\\" href=\\"https://remix.run/docs\\" rel=\\"noreferrer\\">
|
|
80
|
+
Remix Docs
|
|
81
|
+
</a>
|
|
82
|
+
</li>
|
|
83
|
+
</ul>
|
|
84
|
+
</div>
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
"
|
|
88
|
+
`;
|
|
89
|
+
|
|
90
|
+
exports[`Remix Application Integrated Repo --directory should extract the layout directory from the directory options if it exists 1`] = `
|
|
91
|
+
"/**
|
|
92
|
+
* @type {import('@remix-run/dev').AppConfig}
|
|
93
|
+
*/
|
|
94
|
+
module.exports = {
|
|
95
|
+
ignoredRouteFiles: ['**/.*'],
|
|
96
|
+
// appDirectory: \\"app\\",
|
|
97
|
+
// assetsBuildDirectory: \\"public/build\\",
|
|
98
|
+
// serverBuildPath: \\"build/index.js\\",
|
|
99
|
+
// publicPath: \\"/build/\\",
|
|
100
|
+
watchPaths: () => require('@nx/remix').createWatchPaths(__dirname),
|
|
101
|
+
};
|
|
102
|
+
"
|
|
103
|
+
`;
|
|
104
|
+
|
|
105
|
+
exports[`Remix Application Integrated Repo --directory should extract the layout directory from the directory options if it exists 2`] = `
|
|
106
|
+
"import type { MetaFunction } from '@remix-run/node';
|
|
107
|
+
import {
|
|
108
|
+
Links,
|
|
109
|
+
LiveReload,
|
|
110
|
+
Meta,
|
|
111
|
+
Outlet,
|
|
112
|
+
Scripts,
|
|
113
|
+
ScrollRestoration,
|
|
114
|
+
} from '@remix-run/react';
|
|
115
|
+
|
|
116
|
+
export const meta: MetaFunction = () => ({
|
|
117
|
+
charset: 'utf-8',
|
|
118
|
+
title: 'New Remix App',
|
|
119
|
+
viewport: 'width=device-width,initial-scale=1',
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
export default function App() {
|
|
123
|
+
return (
|
|
124
|
+
<html lang=\\"en\\">
|
|
125
|
+
<head>
|
|
126
|
+
<Meta />
|
|
127
|
+
<Links />
|
|
128
|
+
</head>
|
|
129
|
+
<body>
|
|
130
|
+
<Outlet />
|
|
131
|
+
<ScrollRestoration />
|
|
132
|
+
<Scripts />
|
|
133
|
+
<LiveReload />
|
|
134
|
+
</body>
|
|
135
|
+
</html>
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
"
|
|
139
|
+
`;
|
|
140
|
+
|
|
141
|
+
exports[`Remix Application Integrated Repo --directory should extract the layout directory from the directory options if it exists 3`] = `
|
|
142
|
+
"export default function Index() {
|
|
143
|
+
return (
|
|
144
|
+
<div style={{ fontFamily: 'system-ui, sans-serif', lineHeight: '1.4' }}>
|
|
145
|
+
<h1>Welcome to Remix</h1>
|
|
146
|
+
<ul>
|
|
147
|
+
<li>
|
|
148
|
+
<a
|
|
149
|
+
target=\\"_blank\\"
|
|
150
|
+
href=\\"https://remix.run/tutorials/blog\\"
|
|
151
|
+
rel=\\"noreferrer\\"
|
|
152
|
+
>
|
|
153
|
+
15m Quickstart Blog Tutorial
|
|
154
|
+
</a>
|
|
155
|
+
</li>
|
|
156
|
+
<li>
|
|
157
|
+
<a
|
|
158
|
+
target=\\"_blank\\"
|
|
159
|
+
href=\\"https://remix.run/tutorials/jokes\\"
|
|
160
|
+
rel=\\"noreferrer\\"
|
|
161
|
+
>
|
|
162
|
+
Deep Dive Jokes App Tutorial
|
|
163
|
+
</a>
|
|
164
|
+
</li>
|
|
165
|
+
<li>
|
|
166
|
+
<a target=\\"_blank\\" href=\\"https://remix.run/docs\\" rel=\\"noreferrer\\">
|
|
167
|
+
Remix Docs
|
|
168
|
+
</a>
|
|
169
|
+
</li>
|
|
170
|
+
</ul>
|
|
171
|
+
</div>
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
"
|
|
175
|
+
`;
|
|
176
|
+
|
|
177
|
+
exports[`Remix Application Integrated Repo --js should create the application correctly 1`] = `
|
|
178
|
+
"/**
|
|
179
|
+
* @type {import('@remix-run/dev').AppConfig}
|
|
180
|
+
*/
|
|
181
|
+
module.exports = {
|
|
182
|
+
ignoredRouteFiles: ['**/.*'],
|
|
183
|
+
// appDirectory: \\"app\\",
|
|
184
|
+
// assetsBuildDirectory: \\"public/build\\",
|
|
185
|
+
// serverBuildPath: \\"build/index.js\\",
|
|
186
|
+
// publicPath: \\"/build/\\",
|
|
187
|
+
watchPaths: () => require('@nx/remix').createWatchPaths(__dirname),
|
|
188
|
+
};
|
|
189
|
+
"
|
|
190
|
+
`;
|
|
191
|
+
|
|
192
|
+
exports[`Remix Application Integrated Repo --js should create the application correctly 2`] = `
|
|
193
|
+
"import {
|
|
194
|
+
Links,
|
|
195
|
+
LiveReload,
|
|
196
|
+
Meta,
|
|
197
|
+
Outlet,
|
|
198
|
+
Scripts,
|
|
199
|
+
ScrollRestoration,
|
|
200
|
+
} from '@remix-run/react';
|
|
201
|
+
export const meta = () => ({
|
|
202
|
+
charset: 'utf-8',
|
|
203
|
+
title: 'New Remix App',
|
|
204
|
+
viewport: 'width=device-width,initial-scale=1',
|
|
205
|
+
});
|
|
206
|
+
export default function App() {
|
|
207
|
+
return (
|
|
208
|
+
<html lang=\\"en\\">
|
|
209
|
+
<head>
|
|
210
|
+
<Meta />
|
|
211
|
+
<Links />
|
|
212
|
+
</head>
|
|
213
|
+
<body>
|
|
214
|
+
<Outlet />
|
|
215
|
+
<ScrollRestoration />
|
|
216
|
+
<Scripts />
|
|
217
|
+
<LiveReload />
|
|
218
|
+
</body>
|
|
219
|
+
</html>
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
"
|
|
223
|
+
`;
|
|
224
|
+
|
|
225
|
+
exports[`Remix Application Integrated Repo --js should create the application correctly 3`] = `
|
|
226
|
+
"export default function Index() {
|
|
227
|
+
return (
|
|
228
|
+
<div style={{ fontFamily: 'system-ui, sans-serif', lineHeight: '1.4' }}>
|
|
229
|
+
<h1>Welcome to Remix</h1>
|
|
230
|
+
<ul>
|
|
231
|
+
<li>
|
|
232
|
+
<a
|
|
233
|
+
target=\\"_blank\\"
|
|
234
|
+
href=\\"https://remix.run/tutorials/blog\\"
|
|
235
|
+
rel=\\"noreferrer\\"
|
|
236
|
+
>
|
|
237
|
+
15m Quickstart Blog Tutorial
|
|
238
|
+
</a>
|
|
239
|
+
</li>
|
|
240
|
+
<li>
|
|
241
|
+
<a
|
|
242
|
+
target=\\"_blank\\"
|
|
243
|
+
href=\\"https://remix.run/tutorials/jokes\\"
|
|
244
|
+
rel=\\"noreferrer\\"
|
|
245
|
+
>
|
|
246
|
+
Deep Dive Jokes App Tutorial
|
|
247
|
+
</a>
|
|
248
|
+
</li>
|
|
249
|
+
<li>
|
|
250
|
+
<a target=\\"_blank\\" href=\\"https://remix.run/docs\\" rel=\\"noreferrer\\">
|
|
251
|
+
Remix Docs
|
|
252
|
+
</a>
|
|
253
|
+
</li>
|
|
254
|
+
</ul>
|
|
255
|
+
</div>
|
|
256
|
+
);
|
|
257
|
+
}
|
|
258
|
+
"
|
|
259
|
+
`;
|
|
260
|
+
|
|
261
|
+
exports[`Remix Application Integrated Repo should create the application correctly 1`] = `
|
|
262
|
+
"/**
|
|
263
|
+
* @type {import('@remix-run/dev').AppConfig}
|
|
264
|
+
*/
|
|
265
|
+
module.exports = {
|
|
266
|
+
ignoredRouteFiles: ['**/.*'],
|
|
267
|
+
// appDirectory: \\"app\\",
|
|
268
|
+
// assetsBuildDirectory: \\"public/build\\",
|
|
269
|
+
// serverBuildPath: \\"build/index.js\\",
|
|
270
|
+
// publicPath: \\"/build/\\",
|
|
271
|
+
watchPaths: () => require('@nx/remix').createWatchPaths(__dirname),
|
|
272
|
+
};
|
|
273
|
+
"
|
|
274
|
+
`;
|
|
275
|
+
|
|
276
|
+
exports[`Remix Application Integrated Repo should create the application correctly 2`] = `
|
|
277
|
+
"import type { MetaFunction } from '@remix-run/node';
|
|
278
|
+
import {
|
|
279
|
+
Links,
|
|
280
|
+
LiveReload,
|
|
281
|
+
Meta,
|
|
282
|
+
Outlet,
|
|
283
|
+
Scripts,
|
|
284
|
+
ScrollRestoration,
|
|
285
|
+
} from '@remix-run/react';
|
|
286
|
+
|
|
287
|
+
export const meta: MetaFunction = () => ({
|
|
288
|
+
charset: 'utf-8',
|
|
289
|
+
title: 'New Remix App',
|
|
290
|
+
viewport: 'width=device-width,initial-scale=1',
|
|
291
|
+
});
|
|
292
|
+
|
|
293
|
+
export default function App() {
|
|
294
|
+
return (
|
|
295
|
+
<html lang=\\"en\\">
|
|
296
|
+
<head>
|
|
297
|
+
<Meta />
|
|
298
|
+
<Links />
|
|
299
|
+
</head>
|
|
300
|
+
<body>
|
|
301
|
+
<Outlet />
|
|
302
|
+
<ScrollRestoration />
|
|
303
|
+
<Scripts />
|
|
304
|
+
<LiveReload />
|
|
305
|
+
</body>
|
|
306
|
+
</html>
|
|
307
|
+
);
|
|
308
|
+
}
|
|
309
|
+
"
|
|
310
|
+
`;
|
|
311
|
+
|
|
312
|
+
exports[`Remix Application Integrated Repo should create the application correctly 3`] = `
|
|
313
|
+
"export default function Index() {
|
|
314
|
+
return (
|
|
315
|
+
<div style={{ fontFamily: 'system-ui, sans-serif', lineHeight: '1.4' }}>
|
|
316
|
+
<h1>Welcome to Remix</h1>
|
|
317
|
+
<ul>
|
|
318
|
+
<li>
|
|
319
|
+
<a
|
|
320
|
+
target=\\"_blank\\"
|
|
321
|
+
href=\\"https://remix.run/tutorials/blog\\"
|
|
322
|
+
rel=\\"noreferrer\\"
|
|
323
|
+
>
|
|
324
|
+
15m Quickstart Blog Tutorial
|
|
325
|
+
</a>
|
|
326
|
+
</li>
|
|
327
|
+
<li>
|
|
328
|
+
<a
|
|
329
|
+
target=\\"_blank\\"
|
|
330
|
+
href=\\"https://remix.run/tutorials/jokes\\"
|
|
331
|
+
rel=\\"noreferrer\\"
|
|
332
|
+
>
|
|
333
|
+
Deep Dive Jokes App Tutorial
|
|
334
|
+
</a>
|
|
335
|
+
</li>
|
|
336
|
+
<li>
|
|
337
|
+
<a target=\\"_blank\\" href=\\"https://remix.run/docs\\" rel=\\"noreferrer\\">
|
|
338
|
+
Remix Docs
|
|
339
|
+
</a>
|
|
340
|
+
</li>
|
|
341
|
+
</ul>
|
|
342
|
+
</div>
|
|
343
|
+
);
|
|
344
|
+
}
|
|
345
|
+
"
|
|
346
|
+
`;
|
|
347
|
+
|
|
348
|
+
exports[`Remix Application Standalone Project Repo --js should create the application correctly 1`] = `
|
|
349
|
+
"/**
|
|
350
|
+
* @type {import('@remix-run/dev').AppConfig}
|
|
351
|
+
*/
|
|
352
|
+
module.exports = {
|
|
353
|
+
ignoredRouteFiles: ['**/.*'],
|
|
354
|
+
// appDirectory: \\"app\\",
|
|
355
|
+
// assetsBuildDirectory: \\"public/build\\",
|
|
356
|
+
// serverBuildPath: \\"build/index.js\\",
|
|
357
|
+
// publicPath: \\"/build/\\",
|
|
358
|
+
watchPaths: () => require('@nx/remix').createWatchPaths(__dirname),
|
|
359
|
+
};
|
|
360
|
+
"
|
|
361
|
+
`;
|
|
362
|
+
|
|
363
|
+
exports[`Remix Application Standalone Project Repo --js should create the application correctly 2`] = `
|
|
364
|
+
"import {
|
|
365
|
+
Links,
|
|
366
|
+
LiveReload,
|
|
367
|
+
Meta,
|
|
368
|
+
Outlet,
|
|
369
|
+
Scripts,
|
|
370
|
+
ScrollRestoration,
|
|
371
|
+
} from '@remix-run/react';
|
|
372
|
+
export const meta = () => ({
|
|
373
|
+
charset: 'utf-8',
|
|
374
|
+
title: 'New Remix App',
|
|
375
|
+
viewport: 'width=device-width,initial-scale=1',
|
|
376
|
+
});
|
|
377
|
+
export default function App() {
|
|
378
|
+
return (
|
|
379
|
+
<html lang=\\"en\\">
|
|
380
|
+
<head>
|
|
381
|
+
<Meta />
|
|
382
|
+
<Links />
|
|
383
|
+
</head>
|
|
384
|
+
<body>
|
|
385
|
+
<Outlet />
|
|
386
|
+
<ScrollRestoration />
|
|
387
|
+
<Scripts />
|
|
388
|
+
<LiveReload />
|
|
389
|
+
</body>
|
|
390
|
+
</html>
|
|
391
|
+
);
|
|
392
|
+
}
|
|
393
|
+
"
|
|
394
|
+
`;
|
|
395
|
+
|
|
396
|
+
exports[`Remix Application Standalone Project Repo --js should create the application correctly 3`] = `
|
|
397
|
+
"export default function Index() {
|
|
398
|
+
return (
|
|
399
|
+
<div style={{ fontFamily: 'system-ui, sans-serif', lineHeight: '1.4' }}>
|
|
400
|
+
<h1>Welcome to Remix</h1>
|
|
401
|
+
<ul>
|
|
402
|
+
<li>
|
|
403
|
+
<a
|
|
404
|
+
target=\\"_blank\\"
|
|
405
|
+
href=\\"https://remix.run/tutorials/blog\\"
|
|
406
|
+
rel=\\"noreferrer\\"
|
|
407
|
+
>
|
|
408
|
+
15m Quickstart Blog Tutorial
|
|
409
|
+
</a>
|
|
410
|
+
</li>
|
|
411
|
+
<li>
|
|
412
|
+
<a
|
|
413
|
+
target=\\"_blank\\"
|
|
414
|
+
href=\\"https://remix.run/tutorials/jokes\\"
|
|
415
|
+
rel=\\"noreferrer\\"
|
|
416
|
+
>
|
|
417
|
+
Deep Dive Jokes App Tutorial
|
|
418
|
+
</a>
|
|
419
|
+
</li>
|
|
420
|
+
<li>
|
|
421
|
+
<a target=\\"_blank\\" href=\\"https://remix.run/docs\\" rel=\\"noreferrer\\">
|
|
422
|
+
Remix Docs
|
|
423
|
+
</a>
|
|
424
|
+
</li>
|
|
425
|
+
</ul>
|
|
426
|
+
</div>
|
|
427
|
+
);
|
|
428
|
+
}
|
|
429
|
+
"
|
|
430
|
+
`;
|
|
431
|
+
|
|
432
|
+
exports[`Remix Application Standalone Project Repo should create the application correctly 1`] = `
|
|
433
|
+
"/**
|
|
434
|
+
* @type {import('@remix-run/dev').AppConfig}
|
|
435
|
+
*/
|
|
436
|
+
module.exports = {
|
|
437
|
+
ignoredRouteFiles: ['**/.*'],
|
|
438
|
+
// appDirectory: \\"app\\",
|
|
439
|
+
// assetsBuildDirectory: \\"public/build\\",
|
|
440
|
+
// serverBuildPath: \\"build/index.js\\",
|
|
441
|
+
// publicPath: \\"/build/\\",
|
|
442
|
+
watchPaths: () => require('@nx/remix').createWatchPaths(__dirname),
|
|
443
|
+
};
|
|
444
|
+
"
|
|
445
|
+
`;
|
|
446
|
+
|
|
447
|
+
exports[`Remix Application Standalone Project Repo should create the application correctly 2`] = `
|
|
448
|
+
"import type { MetaFunction } from '@remix-run/node';
|
|
449
|
+
import {
|
|
450
|
+
Links,
|
|
451
|
+
LiveReload,
|
|
452
|
+
Meta,
|
|
453
|
+
Outlet,
|
|
454
|
+
Scripts,
|
|
455
|
+
ScrollRestoration,
|
|
456
|
+
} from '@remix-run/react';
|
|
457
|
+
|
|
458
|
+
export const meta: MetaFunction = () => ({
|
|
459
|
+
charset: 'utf-8',
|
|
460
|
+
title: 'New Remix App',
|
|
461
|
+
viewport: 'width=device-width,initial-scale=1',
|
|
462
|
+
});
|
|
463
|
+
|
|
464
|
+
export default function App() {
|
|
465
|
+
return (
|
|
466
|
+
<html lang=\\"en\\">
|
|
467
|
+
<head>
|
|
468
|
+
<Meta />
|
|
469
|
+
<Links />
|
|
470
|
+
</head>
|
|
471
|
+
<body>
|
|
472
|
+
<Outlet />
|
|
473
|
+
<ScrollRestoration />
|
|
474
|
+
<Scripts />
|
|
475
|
+
<LiveReload />
|
|
476
|
+
</body>
|
|
477
|
+
</html>
|
|
478
|
+
);
|
|
479
|
+
}
|
|
480
|
+
"
|
|
481
|
+
`;
|
|
482
|
+
|
|
483
|
+
exports[`Remix Application Standalone Project Repo should create the application correctly 3`] = `
|
|
484
|
+
"export default function Index() {
|
|
485
|
+
return (
|
|
486
|
+
<div style={{ fontFamily: 'system-ui, sans-serif', lineHeight: '1.4' }}>
|
|
487
|
+
<h1>Welcome to Remix</h1>
|
|
488
|
+
<ul>
|
|
489
|
+
<li>
|
|
490
|
+
<a
|
|
491
|
+
target=\\"_blank\\"
|
|
492
|
+
href=\\"https://remix.run/tutorials/blog\\"
|
|
493
|
+
rel=\\"noreferrer\\"
|
|
494
|
+
>
|
|
495
|
+
15m Quickstart Blog Tutorial
|
|
496
|
+
</a>
|
|
497
|
+
</li>
|
|
498
|
+
<li>
|
|
499
|
+
<a
|
|
500
|
+
target=\\"_blank\\"
|
|
501
|
+
href=\\"https://remix.run/tutorials/jokes\\"
|
|
502
|
+
rel=\\"noreferrer\\"
|
|
503
|
+
>
|
|
504
|
+
Deep Dive Jokes App Tutorial
|
|
505
|
+
</a>
|
|
506
|
+
</li>
|
|
507
|
+
<li>
|
|
508
|
+
<a target=\\"_blank\\" href=\\"https://remix.run/docs\\" rel=\\"noreferrer\\">
|
|
509
|
+
Remix Docs
|
|
510
|
+
</a>
|
|
511
|
+
</li>
|
|
512
|
+
</ul>
|
|
513
|
+
</div>
|
|
514
|
+
);
|
|
515
|
+
}
|
|
516
|
+
"
|
|
517
|
+
`;
|
|
@@ -4,16 +4,43 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const create_ts_config_1 = require("@nx/js/src/utils/typescript/create-ts-config");
|
|
6
6
|
const versions_1 = require("../../utils/versions");
|
|
7
|
-
const
|
|
7
|
+
const lib_1 = require("./lib");
|
|
8
8
|
function default_1(tree, _options) {
|
|
9
9
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
10
|
-
const options = (0,
|
|
10
|
+
const options = (0, lib_1.normalizeOptions)(tree, _options);
|
|
11
11
|
const tasks = [];
|
|
12
12
|
(0, devkit_1.addProjectConfiguration)(tree, options.projectName, {
|
|
13
13
|
root: options.projectRoot,
|
|
14
14
|
sourceRoot: `${options.projectRoot}`,
|
|
15
15
|
projectType: 'application',
|
|
16
16
|
tags: options.parsedTags,
|
|
17
|
+
targets: {
|
|
18
|
+
build: {
|
|
19
|
+
command: `remix build`,
|
|
20
|
+
options: {
|
|
21
|
+
cwd: options.projectRoot,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
serve: {
|
|
25
|
+
command: `remix dev`,
|
|
26
|
+
options: {
|
|
27
|
+
cwd: options.projectRoot,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
start: {
|
|
31
|
+
dependsOn: ['build'],
|
|
32
|
+
command: `remix-serve build`,
|
|
33
|
+
options: {
|
|
34
|
+
cwd: options.projectRoot,
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
typecheck: {
|
|
38
|
+
command: `tsc`,
|
|
39
|
+
options: {
|
|
40
|
+
cwd: options.projectRoot,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
},
|
|
17
44
|
});
|
|
18
45
|
const installTask = (0, devkit_1.addDependenciesToPackageJson)(tree, {
|
|
19
46
|
'@remix-run/node': versions_1.remixVersion,
|
|
@@ -41,21 +68,15 @@ function default_1(tree, _options) {
|
|
|
41
68
|
typescriptVersion: versions_1.typescriptVersion });
|
|
42
69
|
(0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, 'files/common'), options.projectRoot, vars);
|
|
43
70
|
if (options.rootProject) {
|
|
44
|
-
(0, devkit_1.updateJson)(tree, 'package.json', (json) => {
|
|
45
|
-
json['scripts'] = {
|
|
46
|
-
build: 'nx exec -- remix build',
|
|
47
|
-
dev: 'nx exec -- remix dev',
|
|
48
|
-
start: 'nx exec -- remix-serve build',
|
|
49
|
-
typecheck: 'nx exec -- tsc',
|
|
50
|
-
};
|
|
51
|
-
return json;
|
|
52
|
-
});
|
|
53
71
|
const gitignore = tree.read('.gitignore', 'utf-8');
|
|
54
72
|
tree.write('.gitignore', `${gitignore}\n.cache\nbuild\npublic/build\n.env\n`);
|
|
55
73
|
}
|
|
56
74
|
else {
|
|
57
75
|
(0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, 'files/integrated'), options.projectRoot, vars);
|
|
58
76
|
}
|
|
77
|
+
if (options.js) {
|
|
78
|
+
(0, devkit_1.toJS)(tree);
|
|
79
|
+
}
|
|
59
80
|
if (options.rootProject && tree.exists('tsconfig.base.json')) {
|
|
60
81
|
// If this is a standalone project, merge tsconfig.json and tsconfig.base.json.
|
|
61
82
|
const tsConfigBaseJson = (0, devkit_1.readJson)(tree, 'tsconfig.base.json');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application.impl.js","sourceRoot":"","sources":["../../../../../../packages/remix/src/generators/application/application.impl.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"application.impl.js","sourceRoot":"","sources":["../../../../../../packages/remix/src/generators/application/application.impl.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"extends": "<%= offsetFromRoot %>tsconfig.base.json",
|
|
3
|
-
"include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"],
|
|
3
|
+
"include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"],
|
|
4
4
|
"compilerOptions": {
|
|
5
5
|
"lib": ["DOM", "DOM.Iterable", "ES2019"],
|
|
6
6
|
"isolatedModules": true,
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
// Remix takes care of building everything in `remix build`.
|
|
16
16
|
"noEmit": true
|
|
17
17
|
}
|
|
18
|
-
}
|
|
18
|
+
}
|
|
@@ -3,12 +3,7 @@
|
|
|
3
3
|
"name": "<%= projectName %>",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"build": "nx exec -- remix build",
|
|
8
|
-
"dev": "nx exec -- remix dev",
|
|
9
|
-
"start": "nx exec -- remix-serve build",
|
|
10
|
-
"typecheck": "nx exec -- tsc"
|
|
11
|
-
},
|
|
6
|
+
"scripts": {},
|
|
12
7
|
"dependencies": {
|
|
13
8
|
"@remix-run/node": "<%= remixVersion %>",
|
|
14
9
|
"@remix-run/react": "<%= remixVersion %>",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './normalize-options';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/remix/src/generators/application/lib/index.ts"],"names":[],"mappings":";;;AAAA,8DAAoC"}
|
|
@@ -2,13 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.normalizeOptions = void 0;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const project_1 = require("../../../utils/project");
|
|
5
6
|
function normalizeOptions(tree, options) {
|
|
6
|
-
const {
|
|
7
|
-
const
|
|
8
|
-
const
|
|
7
|
+
const { layoutDirectory, projectDirectory } = (0, devkit_1.extractLayoutDirectory)(options.directory);
|
|
8
|
+
const appDirectory = (0, project_1.normalizeDirectory)(options.name, projectDirectory);
|
|
9
|
+
const appName = (0, project_1.normalizeProjectName)(options.name, projectDirectory);
|
|
10
|
+
const { appsDir: defaultAppsDir } = (0, devkit_1.getWorkspaceLayout)(tree);
|
|
11
|
+
const appsDir = layoutDirectory !== null && layoutDirectory !== void 0 ? layoutDirectory : defaultAppsDir;
|
|
12
|
+
const projectName = appName;
|
|
9
13
|
const projectRoot = options.rootProject
|
|
10
14
|
? '.'
|
|
11
|
-
: (0, devkit_1.joinPathFragments)(appsDir,
|
|
15
|
+
: (0, devkit_1.joinPathFragments)(appsDir, appDirectory);
|
|
12
16
|
const parsedTags = options.tags
|
|
13
17
|
? options.tags.split(',').map((s) => s.trim())
|
|
14
18
|
: [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-options.js","sourceRoot":"","sources":["../../../../../../../packages/remix/src/generators/application/lib/normalize-options.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"normalize-options.js","sourceRoot":"","sources":["../../../../../../../packages/remix/src/generators/application/lib/normalize-options.ts"],"names":[],"mappings":";;;AAAA,uCAKoB;AACpB,oDAGgC;AAShC,SAAgB,gBAAgB,CAC9B,IAAU,EACV,OAA+B;IAE/B,MAAM,EAAE,eAAe,EAAE,gBAAgB,EAAE,GAAG,IAAA,+BAAsB,EAClE,OAAO,CAAC,SAAS,CAClB,CAAC;IACF,MAAM,YAAY,GAAG,IAAA,4BAAkB,EAAC,OAAO,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;IACxE,MAAM,OAAO,GAAG,IAAA,8BAAoB,EAAC,OAAO,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;IACrE,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,IAAA,2BAAkB,EAAC,IAAI,CAAC,CAAC;IAC7D,MAAM,OAAO,GAAG,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,cAAc,CAAC;IAClD,MAAM,WAAW,GAAG,OAAO,CAAC;IAC5B,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW;QACrC,CAAC,CAAC,GAAG;QACL,CAAC,CAAC,IAAA,0BAAiB,EAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IAC7C,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI;QAC7B,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QAC9C,CAAC,CAAC,EAAE,CAAC;IAEP,uCACK,OAAO,KACV,WAAW;QACX,WAAW;QACX,UAAU,IACV;AACJ,CAAC;AAzBD,4CAyBC"}
|
|
@@ -13,6 +13,17 @@
|
|
|
13
13
|
},
|
|
14
14
|
"x-prompt": "What is the name of the application?"
|
|
15
15
|
},
|
|
16
|
+
"js": {
|
|
17
|
+
"type": "boolean",
|
|
18
|
+
"description": "Generate JavaScript files rather than TypeScript files.",
|
|
19
|
+
"default": false
|
|
20
|
+
},
|
|
21
|
+
"directory": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "A directory where the app is placed.",
|
|
24
|
+
"alias": "dir",
|
|
25
|
+
"x-priority": "important"
|
|
26
|
+
},
|
|
16
27
|
"tags": {
|
|
17
28
|
"type": "string",
|
|
18
29
|
"description": "Add tags to the project (used for linting)",
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addTsconfigEntryPoints = void 0;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const js_1 = require("@nx/js");
|
|
6
|
+
function addTsconfigEntryPoints(tree, options) {
|
|
7
|
+
const { sourceRoot } = (0, devkit_1.readProjectConfiguration)(tree, options.projectName);
|
|
8
|
+
const serverFilePath = (0, devkit_1.joinPathFragments)(sourceRoot, 'server.ts');
|
|
9
|
+
tree.write(serverFilePath, `// This file should be used to export ONLY server-code from the library.`);
|
|
10
|
+
const baseTsConfig = (0, js_1.getRootTsConfigPathInTree)(tree);
|
|
11
|
+
(0, devkit_1.updateJson)(tree, baseTsConfig, (json) => {
|
|
12
|
+
if (json.compilerOptions.paths &&
|
|
13
|
+
json.compilerOptions.paths[options.importPath]) {
|
|
14
|
+
json.compilerOptions.paths[(0, devkit_1.joinPathFragments)(options.importPath, 'server')] = [serverFilePath];
|
|
15
|
+
}
|
|
16
|
+
return json;
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
exports.addTsconfigEntryPoints = addTsconfigEntryPoints;
|
|
20
|
+
//# sourceMappingURL=add-tsconfig-entry-points.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-tsconfig-entry-points.js","sourceRoot":"","sources":["../../../../../../../packages/remix/src/generators/library/lib/add-tsconfig-entry-points.ts"],"names":[],"mappings":";;;AACA,uCAIoB;AACpB,+BAAmD;AAGnD,SAAgB,sBAAsB,CACpC,IAAU,EACV,OAA4B;IAE5B,MAAM,EAAE,UAAU,EAAE,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAC3E,MAAM,cAAc,GAAG,IAAA,0BAAiB,EAAC,UAAU,EAAE,WAAW,CAAC,CAAC;IAElE,IAAI,CAAC,KAAK,CACR,cAAc,EACd,0EAA0E,CAC3E,CAAC;IAEF,MAAM,YAAY,GAAG,IAAA,8BAAyB,EAAC,IAAI,CAAC,CAAC;IACrD,IAAA,mBAAU,EAAC,IAAI,EAAE,YAAY,EAAE,CAAC,IAAI,EAAE,EAAE;QACtC,IACE,IAAI,CAAC,eAAe,CAAC,KAAK;YAC1B,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAC9C;YACA,IAAI,CAAC,eAAe,CAAC,KAAK,CACxB,IAAA,0BAAiB,EAAC,OAAO,CAAC,UAAU,EAAE,QAAQ,CAAC,CAChD,GAAG,CAAC,cAAc,CAAC,CAAC;SACtB;QAED,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC;AAzBD,wDAyBC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./add-tsconfig-entry-points"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./normalize-options"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./update-buildable-config"), exports);
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/remix/src/generators/library/lib/index.ts"],"names":[],"mappings":";;;AAAA,sEAA4C;AAC5C,8DAAoC;AACpC,oEAA0C"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Tree } from '@nx/devkit';
|
|
2
|
+
import type { NxRemixGeneratorSchema } from '../schema';
|
|
3
|
+
export interface RemixLibraryOptions extends NxRemixGeneratorSchema {
|
|
4
|
+
projectName: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function normalizeOptions(tree: Tree, options: NxRemixGeneratorSchema): RemixLibraryOptions;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.normalizeOptions = void 0;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const get_import_path_1 = require("@nx/js/src/utils/get-import-path");
|
|
6
|
+
const project_1 = require("../../../utils/project");
|
|
7
|
+
function normalizeOptions(tree, options) {
|
|
8
|
+
var _a;
|
|
9
|
+
const name = (0, devkit_1.names)(options.name).fileName;
|
|
10
|
+
const { projectDirectory } = (0, devkit_1.extractLayoutDirectory)(options.directory);
|
|
11
|
+
const fullProjectDirectory = (0, project_1.normalizeDirectory)(name, projectDirectory);
|
|
12
|
+
const { npmScope } = (0, devkit_1.getWorkspaceLayout)(tree);
|
|
13
|
+
const importPath = (_a = options.importPath) !== null && _a !== void 0 ? _a : (0, get_import_path_1.getImportPath)(tree, fullProjectDirectory);
|
|
14
|
+
const projectName = (0, project_1.normalizeProjectName)(name, projectDirectory);
|
|
15
|
+
return Object.assign(Object.assign({}, options), { name,
|
|
16
|
+
importPath,
|
|
17
|
+
projectName });
|
|
18
|
+
}
|
|
19
|
+
exports.normalizeOptions = normalizeOptions;
|
|
20
|
+
//# sourceMappingURL=normalize-options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalize-options.js","sourceRoot":"","sources":["../../../../../../../packages/remix/src/generators/library/lib/normalize-options.ts"],"names":[],"mappings":";;;AACA,uCAA+E;AAC/E,sEAAiE;AACjE,oDAGgC;AAOhC,SAAgB,gBAAgB,CAC9B,IAAU,EACV,OAA+B;;IAE/B,MAAM,IAAI,GAAG,IAAA,cAAK,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC;IAE1C,MAAM,EAAE,gBAAgB,EAAE,GAAG,IAAA,+BAAsB,EAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACvE,MAAM,oBAAoB,GAAG,IAAA,4BAAkB,EAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;IACxE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAA,2BAAkB,EAAC,IAAI,CAAC,CAAC;IAE9C,MAAM,UAAU,GACd,MAAA,OAAO,CAAC,UAAU,mCAAI,IAAA,+BAAa,EAAC,IAAI,EAAE,oBAAoB,CAAC,CAAC;IAElE,MAAM,WAAW,GAAG,IAAA,8BAAoB,EAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;IAEjE,uCACK,OAAO,KACV,IAAI;QACJ,UAAU;QACV,WAAW,IACX;AACJ,CAAC;AArBD,4CAqBC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateBuildableConfig = void 0;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
function updateBuildableConfig(tree, name) {
|
|
6
|
+
// Nest dist under project root to we can link it
|
|
7
|
+
const project = (0, devkit_1.readProjectConfiguration)(tree, name);
|
|
8
|
+
project.targets.build.options = Object.assign(Object.assign({}, project.targets.build.options), { format: ['cjs'], outputPath: (0, devkit_1.joinPathFragments)(project.root, 'dist') });
|
|
9
|
+
(0, devkit_1.updateProjectConfiguration)(tree, name, project);
|
|
10
|
+
// Point to nested dist for yarn/npm/pnpm workspaces
|
|
11
|
+
(0, devkit_1.updateJson)(tree, (0, devkit_1.joinPathFragments)(project.root, 'package.json'), (json) => {
|
|
12
|
+
json.main = './dist/index.cjs.js';
|
|
13
|
+
json.typings = './dist/index.d.ts';
|
|
14
|
+
return json;
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
exports.updateBuildableConfig = updateBuildableConfig;
|
|
18
|
+
//# sourceMappingURL=update-buildable-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-buildable-config.js","sourceRoot":"","sources":["../../../../../../../packages/remix/src/generators/library/lib/update-buildable-config.ts"],"names":[],"mappings":";;;AACA,uCAKoB;AAEpB,SAAgB,qBAAqB,CAAC,IAAU,EAAE,IAAY;IAC5D,iDAAiD;IACjD,MAAM,OAAO,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACrD,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,mCACxB,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,KAChC,MAAM,EAAE,CAAC,KAAK,CAAC,EACf,UAAU,EAAE,IAAA,0BAAiB,EAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,GACpD,CAAC;IACF,IAAA,mCAA0B,EAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IAEhD,oDAAoD;IACpD,IAAA,mBAAU,EAAC,IAAI,EAAE,IAAA,0BAAiB,EAAC,OAAO,CAAC,IAAI,EAAE,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE;QACzE,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;QAClC,IAAI,CAAC,OAAO,GAAG,mBAAmB,CAAC;QACnC,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC;AAhBD,sDAgBC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import type { Tree } from '@nx/devkit';
|
|
2
|
+
import { GeneratorCallback } from '@nx/devkit';
|
|
3
|
+
import type { NxRemixGeneratorSchema } from './schema';
|
|
4
|
+
export default function (tree: Tree, schema: NxRemixGeneratorSchema): Promise<GeneratorCallback>;
|
|
@@ -4,52 +4,32 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const linter_1 = require("@nx/linter");
|
|
6
6
|
const library_1 = require("@nx/react/src/generators/library/library");
|
|
7
|
-
const
|
|
8
|
-
function default_1(tree,
|
|
7
|
+
const lib_1 = require("./lib");
|
|
8
|
+
function default_1(tree, schema) {
|
|
9
9
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
10
10
|
const tasks = [];
|
|
11
|
-
const
|
|
12
|
-
const pm = (0, devkit_1.detectPackageManager)();
|
|
13
|
-
const { libsDir } = (0, devkit_1.getWorkspaceLayout)(tree);
|
|
14
|
-
const projectRoot = (0, devkit_1.joinPathFragments)(libsDir, name);
|
|
11
|
+
const options = (0, lib_1.normalizeOptions)(tree, schema);
|
|
15
12
|
const libGenTask = yield (0, library_1.libraryGenerator)(tree, {
|
|
16
|
-
name,
|
|
13
|
+
name: options.name,
|
|
17
14
|
style: options.style,
|
|
18
15
|
unitTestRunner: 'jest',
|
|
19
16
|
tags: options.tags,
|
|
20
17
|
importPath: options.importPath,
|
|
21
|
-
|
|
18
|
+
directory: options.directory,
|
|
19
|
+
skipFormat: true,
|
|
22
20
|
skipTsConfig: false,
|
|
23
21
|
linter: linter_1.Linter.EsLint,
|
|
24
22
|
component: true,
|
|
23
|
+
buildable: options.buildable,
|
|
25
24
|
});
|
|
26
25
|
tasks.push(libGenTask);
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
json.typings = './dist/index.d.ts';
|
|
35
|
-
return json;
|
|
36
|
-
});
|
|
37
|
-
// Link workspaces
|
|
38
|
-
tasks.push(() => {
|
|
39
|
-
let command;
|
|
40
|
-
if (pm === 'npm') {
|
|
41
|
-
command = `npm install -ws`;
|
|
42
|
-
}
|
|
43
|
-
else if (pm === 'yarn') {
|
|
44
|
-
command = `yarn`;
|
|
45
|
-
}
|
|
46
|
-
else if (pm === 'pnpm') {
|
|
47
|
-
command = `pnpm install`;
|
|
48
|
-
}
|
|
49
|
-
(0, child_process_1.execSync)(command, {
|
|
50
|
-
stdio: [0, 1, 2],
|
|
51
|
-
});
|
|
52
|
-
});
|
|
26
|
+
(0, lib_1.addTsconfigEntryPoints)(tree, options);
|
|
27
|
+
if (options.buildable) {
|
|
28
|
+
(0, lib_1.updateBuildableConfig)(tree, options.projectName);
|
|
29
|
+
}
|
|
30
|
+
if (!options.skipFormat) {
|
|
31
|
+
yield (0, devkit_1.formatFiles)(tree);
|
|
32
|
+
}
|
|
53
33
|
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
54
34
|
});
|
|
55
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"library.impl.js","sourceRoot":"","sources":["../../../../../../packages/remix/src/generators/library/library.impl.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"library.impl.js","sourceRoot":"","sources":["../../../../../../packages/remix/src/generators/library/library.impl.ts"],"names":[],"mappings":";;;AACA,uCAA8E;AAC9E,uCAAoC;AACpC,sEAA4E;AAC5E,+BAIe;AAGf,mBAA+B,IAAU,EAAE,MAA8B;;QACvE,MAAM,KAAK,GAAwB,EAAE,CAAC;QACtC,MAAM,OAAO,GAAG,IAAA,sBAAgB,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAE/C,MAAM,UAAU,GAAG,MAAM,IAAA,0BAAgB,EAAC,IAAI,EAAE;YAC9C,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,cAAc,EAAE,MAAM;YACtB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,UAAU,EAAE,IAAI;YAChB,YAAY,EAAE,KAAK;YACnB,MAAM,EAAE,eAAM,CAAC,MAAM;YACrB,SAAS,EAAE,IAAI;YACf,SAAS,EAAE,OAAO,CAAC,SAAS;SAC7B,CAAC,CAAC;QACH,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAEvB,IAAA,4BAAsB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAEtC,IAAI,OAAO,CAAC,SAAS,EAAE;YACrB,IAAA,2BAAqB,EAAC,IAAI,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;SAClD;QAED,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YACvB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;SACzB;QAED,OAAO,IAAA,yBAAgB,EAAC,GAAG,KAAK,CAAC,CAAC;IACpC,CAAC;CAAA;AA9BD,4BA8BC"}
|
|
@@ -2,8 +2,11 @@ import { SupportedStyles } from '@nx/react';
|
|
|
2
2
|
|
|
3
3
|
export interface NxRemixGeneratorSchema {
|
|
4
4
|
name: string;
|
|
5
|
+
style: SupportedStyles;
|
|
6
|
+
directory?: string;
|
|
5
7
|
tags?: string;
|
|
6
8
|
importPath?: string;
|
|
9
|
+
buildable?: boolean;
|
|
7
10
|
js?: boolean;
|
|
8
|
-
|
|
11
|
+
skipFormat?: boolean;
|
|
9
12
|
}
|
|
@@ -20,6 +20,12 @@
|
|
|
20
20
|
"x-prompt": "What name would you like to use for the library?",
|
|
21
21
|
"pattern": "^[a-zA-Z].*$"
|
|
22
22
|
},
|
|
23
|
+
"directory": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"description": "A directory where the lib is placed.",
|
|
26
|
+
"alias": "dir",
|
|
27
|
+
"x-priority": "important"
|
|
28
|
+
},
|
|
23
29
|
"tags": {
|
|
24
30
|
"type": "string",
|
|
25
31
|
"description": "Add tags to the library (used for linting)"
|
|
@@ -27,9 +33,17 @@
|
|
|
27
33
|
"style": {
|
|
28
34
|
"type": "string",
|
|
29
35
|
"description": "Generate a stylesheet",
|
|
30
|
-
"enum": [
|
|
36
|
+
"enum": [
|
|
37
|
+
"none",
|
|
38
|
+
"css"
|
|
39
|
+
],
|
|
31
40
|
"default": "css"
|
|
32
41
|
},
|
|
42
|
+
"buildable": {
|
|
43
|
+
"type": "boolean",
|
|
44
|
+
"description": "Should the library be buildable?",
|
|
45
|
+
"default": false
|
|
46
|
+
},
|
|
33
47
|
"importPath": {
|
|
34
48
|
"type": "string",
|
|
35
49
|
"description": "The library name used to import it, like @myorg/my-awesome-lib"
|
|
@@ -38,7 +52,15 @@
|
|
|
38
52
|
"type": "boolean",
|
|
39
53
|
"description": "Generate JavaScript files rather than TypeScript files",
|
|
40
54
|
"default": false
|
|
55
|
+
},
|
|
56
|
+
"skipFormat": {
|
|
57
|
+
"type": "boolean",
|
|
58
|
+
"description": "Skip formatting files after generator runs",
|
|
59
|
+
"default": false,
|
|
60
|
+
"x-priority": "internal"
|
|
41
61
|
}
|
|
42
62
|
},
|
|
43
|
-
"required": [
|
|
63
|
+
"required": [
|
|
64
|
+
"name"
|
|
65
|
+
]
|
|
44
66
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -8,3 +8,4 @@ export * from './generators/preset/preset.impl';
|
|
|
8
8
|
export * from './generators/resource-route/resource-route.impl';
|
|
9
9
|
export * from './generators/route/route.impl';
|
|
10
10
|
export * from './generators/style/style.impl';
|
|
11
|
+
export { createWatchPaths } from './utils/create-watch-paths';
|
package/src/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createWatchPaths = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
tslib_1.__exportStar(require("./generators/action/action.impl"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./generators/application/application.impl"), exports);
|
|
@@ -11,4 +12,6 @@ tslib_1.__exportStar(require("./generators/preset/preset.impl"), exports);
|
|
|
11
12
|
tslib_1.__exportStar(require("./generators/resource-route/resource-route.impl"), exports);
|
|
12
13
|
tslib_1.__exportStar(require("./generators/route/route.impl"), exports);
|
|
13
14
|
tslib_1.__exportStar(require("./generators/style/style.impl"), exports);
|
|
15
|
+
var create_watch_paths_1 = require("./utils/create-watch-paths");
|
|
16
|
+
Object.defineProperty(exports, "createWatchPaths", { enumerable: true, get: function () { return create_watch_paths_1.createWatchPaths; } });
|
|
14
17
|
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/remix/src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/remix/src/index.ts"],"names":[],"mappings":";;;;AAAA,0EAAgD;AAChD,oFAA0D;AAC1D,4EAAkD;AAClD,4EAAkD;AAClD,0EAAgD;AAChD,sEAA4C;AAC5C,0EAAgD;AAChD,0FAAgE;AAChE,wEAA8C;AAC9C,wEAA8C;AAC9C,iEAA8D;AAArD,sHAAA,gBAAgB,OAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ProjectGraph, type ProjectGraphProjectNode } from '@nx/devkit';
|
|
2
|
+
/**
|
|
3
|
+
* Generates an array of paths to watch based on the project dependencies.
|
|
4
|
+
*
|
|
5
|
+
* @param {string} dirname The absolute path to the Remix project, typically `__dirname`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function createWatchPaths(dirname: string): Promise<string[]>;
|
|
8
|
+
export declare function getRelativeDependencyPaths(project: ProjectGraphProjectNode, deps: string[], graph: ProjectGraph): string[];
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRelativeDependencyPaths = exports.createWatchPaths = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
const find_project_for_path_1 = require("nx/src/project-graph/utils/find-project-for-path");
|
|
7
|
+
const project_graph_utils_1 = require("nx/src/utils/project-graph-utils");
|
|
8
|
+
const path_1 = require("path");
|
|
9
|
+
/**
|
|
10
|
+
* Generates an array of paths to watch based on the project dependencies.
|
|
11
|
+
*
|
|
12
|
+
* @param {string} dirname The absolute path to the Remix project, typically `__dirname`.
|
|
13
|
+
*/
|
|
14
|
+
function createWatchPaths(dirname) {
|
|
15
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
16
|
+
const graph = yield (0, devkit_1.createProjectGraphAsync)();
|
|
17
|
+
const projectRootMappings = (0, find_project_for_path_1.createProjectRootMappings)(graph.nodes);
|
|
18
|
+
const projectName = (0, find_project_for_path_1.findProjectForPath)((0, path_1.relative)(devkit_1.workspaceRoot, dirname), projectRootMappings);
|
|
19
|
+
const deps = (0, project_graph_utils_1.findAllProjectNodeDependencies)(projectName, graph);
|
|
20
|
+
return getRelativeDependencyPaths(graph.nodes[projectName], deps, graph);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
exports.createWatchPaths = createWatchPaths;
|
|
24
|
+
// Exported for testing
|
|
25
|
+
function getRelativeDependencyPaths(project, deps, graph) {
|
|
26
|
+
var _a, _b;
|
|
27
|
+
if (!((_a = project.data) === null || _a === void 0 ? void 0 : _a.root)) {
|
|
28
|
+
throw new Error(`Project ${project.name} has no root set. Check the project configuration.`);
|
|
29
|
+
}
|
|
30
|
+
const paths = new Set();
|
|
31
|
+
const offset = (0, devkit_1.offsetFromRoot)(project.data.root);
|
|
32
|
+
const [baseProjectPath] = project.data.root.split('/');
|
|
33
|
+
for (const dep of deps) {
|
|
34
|
+
const node = graph.nodes[dep];
|
|
35
|
+
if (!((_b = node === null || node === void 0 ? void 0 : node.data) === null || _b === void 0 ? void 0 : _b.root))
|
|
36
|
+
continue;
|
|
37
|
+
const [basePath] = (0, path_1.normalize)(node.data.root).split(path_1.sep);
|
|
38
|
+
const watchPath = baseProjectPath !== basePath ? basePath : node.data.root;
|
|
39
|
+
const relativeWatchPath = (0, devkit_1.joinPathFragments)(offset, watchPath);
|
|
40
|
+
paths.add(relativeWatchPath);
|
|
41
|
+
}
|
|
42
|
+
return Array.from(paths);
|
|
43
|
+
}
|
|
44
|
+
exports.getRelativeDependencyPaths = getRelativeDependencyPaths;
|
|
45
|
+
//# sourceMappingURL=create-watch-paths.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-watch-paths.js","sourceRoot":"","sources":["../../../../../packages/remix/src/utils/create-watch-paths.ts"],"names":[],"mappings":";;;;AAAA,uCAOoB;AACpB,4FAG0D;AAC1D,0EAAkF;AAClF,+BAAgD;AAEhD;;;;GAIG;AACH,SAAsB,gBAAgB,CAAC,OAAe;;QACpD,MAAM,KAAK,GAAG,MAAM,IAAA,gCAAuB,GAAE,CAAC;QAC9C,MAAM,mBAAmB,GAAG,IAAA,iDAAyB,EAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACnE,MAAM,WAAW,GAAG,IAAA,0CAAkB,EACpC,IAAA,eAAQ,EAAC,sBAAa,EAAE,OAAO,CAAC,EAChC,mBAAmB,CACpB,CAAC;QACF,MAAM,IAAI,GAAG,IAAA,oDAA8B,EAAC,WAAW,EAAE,KAAK,CAAC,CAAC;QAEhE,OAAO,0BAA0B,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;IAC3E,CAAC;CAAA;AAVD,4CAUC;AAED,uBAAuB;AACvB,SAAgB,0BAA0B,CACxC,OAAgC,EAChC,IAAc,EACd,KAAmB;;IAEnB,IAAI,CAAC,CAAA,MAAA,OAAO,CAAC,IAAI,0CAAE,IAAI,CAAA,EAAE;QACvB,MAAM,IAAI,KAAK,CACb,WAAW,OAAO,CAAC,IAAI,oDAAoD,CAC5E,CAAC;KACH;IAED,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;IAChC,MAAM,MAAM,GAAG,IAAA,uBAAc,EAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjD,MAAM,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAEvD,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;QACtB,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC9B,IAAI,CAAC,CAAA,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,0CAAE,IAAI,CAAA;YAAE,SAAS;QAChC,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAA,gBAAS,EAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,UAAG,CAAC,CAAC;QACxD,MAAM,SAAS,GAAG,eAAe,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;QAC3E,MAAM,iBAAiB,GAAG,IAAA,0BAAiB,EAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QAC/D,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;KAC9B;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC3B,CAAC;AAzBD,gEAyBC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.normalizeProjectName = exports.normalizeDirectory = void 0;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
function normalizeDirectory(appName, directoryName) {
|
|
6
|
+
return directoryName
|
|
7
|
+
? `${(0, devkit_1.names)(directoryName).fileName}/${(0, devkit_1.names)(appName).fileName}`
|
|
8
|
+
: (0, devkit_1.names)(appName).fileName;
|
|
9
|
+
}
|
|
10
|
+
exports.normalizeDirectory = normalizeDirectory;
|
|
11
|
+
function normalizeProjectName(appName, directoryName) {
|
|
12
|
+
return normalizeDirectory(appName, directoryName).replace(/\//g, '-');
|
|
13
|
+
}
|
|
14
|
+
exports.normalizeProjectName = normalizeProjectName;
|
|
15
|
+
//# sourceMappingURL=project.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../../../../packages/remix/src/utils/project.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AAEnC,SAAgB,kBAAkB,CAChC,OAAe,EACf,aAAqB;IAErB,OAAO,aAAa;QAClB,CAAC,CAAC,GAAG,IAAA,cAAK,EAAC,aAAa,CAAC,CAAC,QAAQ,IAAI,IAAA,cAAK,EAAC,OAAO,CAAC,CAAC,QAAQ,EAAE;QAC/D,CAAC,CAAC,IAAA,cAAK,EAAC,OAAO,CAAC,CAAC,QAAQ,CAAC;AAC9B,CAAC;AAPD,gDAOC;AAED,SAAgB,oBAAoB,CAClC,OAAe,EACf,aAAqB;IAErB,OAAO,kBAAkB,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AACxE,CAAC;AALD,oDAKC"}
|