@nx/remix 17.0.0 → 17.2.5
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/README.md +32 -89
- package/executors.json +0 -12
- package/generators.d.ts +14 -0
- package/generators.js +17 -0
- package/generators.json +3 -9
- package/index.d.ts +1 -0
- package/index.js +5 -0
- package/migrations.json +23 -123
- package/package.json +42 -13
- package/plugins/component-testing/index.js +11 -6
- package/src/executors/build/build.impl.js +64 -74
- package/src/executors/serve/serve.impl.js +43 -43
- package/src/generators/action/action.impl.js +24 -26
- package/src/generators/action/schema.d.ts +7 -1
- package/src/generators/action/schema.json +10 -3
- package/src/generators/application/__snapshots__/application.impl.spec.ts.snap +774 -147
- package/src/generators/application/application.impl.js +181 -131
- package/src/generators/application/files/common/app/root.tsx__tmpl__ +3 -3
- package/src/generators/application/files/common/tests/routes/_index.spec.tsx__tmpl__ +16 -0
- package/src/generators/application/files/integrated/package.json__tmpl__ +1 -0
- package/src/generators/application/lib/index.js +0 -1
- package/src/generators/application/lib/normalize-options.d.ts +5 -3
- package/src/generators/application/lib/normalize-options.js +23 -15
- package/src/generators/application/lib/update-unit-test-config.js +8 -3
- package/src/generators/application/schema.d.ts +5 -0
- package/src/generators/application/schema.json +14 -9
- package/src/generators/cypress/cypress.impl.js +52 -42
- package/src/generators/cypress/schema.d.ts +5 -1
- package/src/generators/cypress/schema.json +6 -0
- package/src/generators/cypress-component-configuration/cypress-component-configuration.impl.js +13 -18
- package/src/generators/error-boundary/__snapshots__/error-boundary.impl.spec.ts.snap +39 -27
- package/src/generators/error-boundary/error-boundary.impl.js +6 -15
- package/src/generators/error-boundary/lib/add-v2-error-boundary.js +11 -16
- package/src/generators/error-boundary/lib/index.d.ts +0 -1
- package/src/generators/error-boundary/lib/index.js +0 -2
- package/src/generators/error-boundary/lib/normalize-options.d.ts +1 -1
- package/src/generators/error-boundary/lib/normalize-options.js +9 -5
- package/src/generators/error-boundary/schema.d.ts +7 -2
- package/src/generators/error-boundary/schema.json +14 -12
- package/src/generators/library/__snapshots__/library.impl.spec.ts.snap +157 -0
- package/src/generators/library/lib/add-tsconfig-entry-points.js +0 -1
- package/src/generators/library/lib/add-unit-testing.js +4 -6
- package/src/generators/library/lib/index.js +0 -1
- package/src/generators/library/lib/normalize-options.d.ts +2 -1
- package/src/generators/library/lib/normalize-options.js +16 -12
- package/src/generators/library/lib/update-buildable-config.js +5 -2
- package/src/generators/library/library.impl.js +29 -32
- package/src/generators/library/schema.d.ts +2 -0
- package/src/generators/library/schema.json +6 -0
- package/src/generators/loader/loader.impl.js +24 -26
- package/src/generators/loader/schema.d.ts +7 -1
- package/src/generators/loader/schema.json +10 -3
- package/src/generators/meta/lib/v2.impl.js +14 -16
- package/src/generators/meta/meta.impl.js +2 -17
- package/src/generators/meta/schema.d.ts +7 -2
- package/src/generators/meta/schema.json +10 -7
- package/src/generators/preset/lib/normalize-options.js +5 -3
- package/src/generators/preset/preset.impl.js +18 -23
- package/src/generators/preset/schema.json +1 -0
- package/src/generators/resource-route/__snapshots__/resource-route.impl.spec.ts.snap +21 -0
- package/src/generators/resource-route/resource-route.impl.js +32 -26
- package/src/generators/resource-route/schema.d.ts +7 -1
- package/src/generators/resource-route/schema.json +10 -3
- package/src/generators/route/__snapshots__/route.impl.spec.ts.snap +62 -9
- package/src/generators/route/route.impl.js +55 -43
- package/src/generators/route/schema.d.ts +7 -1
- package/src/generators/route/schema.json +11 -4
- package/src/generators/setup/schema.json +1 -0
- package/src/generators/setup/setup.impl.js +23 -23
- package/src/generators/setup-tailwind/__snapshots__/setup-tailwind.impl.spec.ts.snap +27 -23
- package/src/generators/setup-tailwind/lib/index.js +0 -1
- package/src/generators/setup-tailwind/lib/update-remix-config.js +2 -3
- package/src/generators/setup-tailwind/schema.json +1 -0
- package/src/generators/setup-tailwind/setup-tailwind.impl.js +25 -29
- package/src/generators/storybook-configuration/schema.d.ts +1 -1
- package/src/generators/storybook-configuration/schema.json +4 -11
- package/src/generators/storybook-configuration/storybook-configuration.impl.js +8 -13
- package/src/generators/style/schema.d.ts +7 -1
- package/src/generators/style/schema.json +12 -5
- package/src/generators/style/style.impl.js +32 -24
- package/src/utils/create-watch-paths.js +8 -13
- package/src/utils/get-default-export-name.js +1 -3
- package/src/utils/get-default-export.js +0 -1
- package/src/utils/insert-import.js +0 -1
- package/src/utils/insert-statement-after-imports.js +0 -1
- package/src/utils/insert-statement-in-default-function.js +0 -1
- package/src/utils/remix-config.d.ts +1 -2
- package/src/utils/remix-config.js +8 -9
- package/src/utils/remix-route-utils.d.ts +2 -2
- package/src/utils/remix-route-utils.js +23 -17
- package/src/utils/testing-config-utils.js +0 -1
- package/src/utils/upsert-links-function.js +0 -1
- package/src/utils/versions.d.ts +9 -8
- package/src/utils/versions.js +14 -14
- package/plugins/component-testing/index.js.map +0 -1
- package/src/executors/build/build.impl.js.map +0 -1
- package/src/executors/build/compat.d.ts +0 -2
- package/src/executors/build/compat.js +0 -6
- package/src/executors/build/compat.js.map +0 -1
- package/src/executors/serve/compat.d.ts +0 -2
- package/src/executors/serve/compat.js +0 -6
- package/src/executors/serve/compat.js.map +0 -1
- package/src/executors/serve/serve.impl.js.map +0 -1
- package/src/generators/action/action.impl.js.map +0 -1
- package/src/generators/application/application.impl.js.map +0 -1
- package/src/generators/application/lib/index.js.map +0 -1
- package/src/generators/application/lib/normalize-options.js.map +0 -1
- package/src/generators/application/lib/update-unit-test-config.js.map +0 -1
- package/src/generators/cypress/cypress.impl.js.map +0 -1
- package/src/generators/cypress-component-configuration/cypress-component-configuration.impl.js.map +0 -1
- package/src/generators/error-boundary/error-boundary.impl.js.map +0 -1
- package/src/generators/error-boundary/lib/add-v1-error-boundary.d.ts +0 -3
- package/src/generators/error-boundary/lib/add-v1-error-boundary.js +0 -21
- package/src/generators/error-boundary/lib/add-v1-error-boundary.js.map +0 -1
- package/src/generators/error-boundary/lib/add-v2-error-boundary.js.map +0 -1
- package/src/generators/error-boundary/lib/index.js.map +0 -1
- package/src/generators/error-boundary/lib/normalize-options.js.map +0 -1
- package/src/generators/library/lib/add-tsconfig-entry-points.js.map +0 -1
- package/src/generators/library/lib/add-unit-testing.js.map +0 -1
- package/src/generators/library/lib/index.js.map +0 -1
- package/src/generators/library/lib/normalize-options.js.map +0 -1
- package/src/generators/library/lib/update-buildable-config.js.map +0 -1
- package/src/generators/library/library.impl.js.map +0 -1
- package/src/generators/loader/loader.impl.js.map +0 -1
- package/src/generators/meta/lib/normalize-options.d.ts +0 -3
- package/src/generators/meta/lib/normalize-options.js +0 -15
- package/src/generators/meta/lib/normalize-options.js.map +0 -1
- package/src/generators/meta/lib/v1.impl.d.ts +0 -3
- package/src/generators/meta/lib/v1.impl.js +0 -30
- package/src/generators/meta/lib/v1.impl.js.map +0 -1
- package/src/generators/meta/lib/v2.impl.js.map +0 -1
- package/src/generators/meta/meta.impl.js.map +0 -1
- package/src/generators/preset/lib/normalize-options.js.map +0 -1
- package/src/generators/preset/preset.impl.js.map +0 -1
- package/src/generators/resource-route/resource-route.impl.js.map +0 -1
- package/src/generators/route/route.impl.js.map +0 -1
- package/src/generators/setup/setup.impl.js.map +0 -1
- package/src/generators/setup-tailwind/lib/index.js.map +0 -1
- package/src/generators/setup-tailwind/lib/update-remix-config.js.map +0 -1
- package/src/generators/setup-tailwind/setup-tailwind.impl.js.map +0 -1
- package/src/generators/storybook-configuration/storybook-configuration.impl.js.map +0 -1
- package/src/generators/style/style.impl.js.map +0 -1
- package/src/index.d.ts +0 -15
- package/src/index.js +0 -21
- package/src/index.js.map +0 -1
- package/src/migrations/update-14-5-4/update-tsconfig-and-remix-config-for-1-6-8.d.ts +0 -6
- package/src/migrations/update-14-5-4/update-tsconfig-and-remix-config-for-1-6-8.js +0 -45
- package/src/migrations/update-14-5-4/update-tsconfig-and-remix-config-for-1-6-8.js.map +0 -1
- package/src/migrations/update-15-8-6/update-remix-env-d.d.ts +0 -6
- package/src/migrations/update-15-8-6/update-remix-env-d.js +0 -27
- package/src/migrations/update-15-8-6/update-remix-env-d.js.map +0 -1
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +0 -2
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +0 -13
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js.map +0 -1
- package/src/utils/create-watch-paths.js.map +0 -1
- package/src/utils/get-default-export-name.js.map +0 -1
- package/src/utils/get-default-export.js.map +0 -1
- package/src/utils/get-remix-projects.d.ts +0 -2
- package/src/utils/get-remix-projects.js +0 -15
- package/src/utils/get-remix-projects.js.map +0 -1
- package/src/utils/insert-import.js.map +0 -1
- package/src/utils/insert-statement-after-imports.js.map +0 -1
- package/src/utils/insert-statement-in-default-function.js.map +0 -1
- package/src/utils/project.d.ts +0 -2
- package/src/utils/project.js +0 -15
- package/src/utils/project.js.map +0 -1
- package/src/utils/remix-config.js.map +0 -1
- package/src/utils/remix-route-utils.js.map +0 -1
- package/src/utils/testing-config-utils.js.map +0 -1
- package/src/utils/upsert-links-function.js.map +0 -1
- package/src/utils/versions.js.map +0 -1
- /package/src/generators/application/files/common/app/routes/{index.tsx__tmpl__ → _index.tsx__tmpl__} +0 -0
- /package/src/generators/application/files/common/{remix.config.js__tmpl__ → remix.config.cjs__tmpl__} +0 -0
package/README.md
CHANGED
|
@@ -1,120 +1,63 @@
|
|
|
1
|
-
<p style="text-align: center;"><img src="https://
|
|
1
|
+
<p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx.png" width="600" alt="Nx - Smart Monorepos · Fast CI"></p>
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<div style="text-align: center;">
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://circleci.com/gh/nrwl/nx)
|
|
6
|
+
[]()
|
|
7
|
+
[](https://www.npmjs.com/@nx/workspace)
|
|
8
|
+
[]()
|
|
9
|
+
[](http://commitizen.github.io/cz-cli/)
|
|
10
|
+
[](https://gitter.im/nrwl-nx/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
|
11
|
+
[](https://go.nx.dev/community)
|
|
6
12
|
|
|
7
|
-
|
|
13
|
+
</div>
|
|
8
14
|
|
|
9
|
-
Use `--preset=@nx/remix` when creating new workspace.
|
|
10
15
|
|
|
11
|
-
|
|
16
|
+
<hr>
|
|
12
17
|
|
|
13
|
-
|
|
14
|
-
npx create-nx-workspace@latest acme \
|
|
15
|
-
--preset=@nx/remix \
|
|
16
|
-
--project=demo
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
Now, you can go into the `acme` folder and start development.
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
cd acme
|
|
23
|
-
npx nx dev demo
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
**Note:** This command runs the `dev` script in `apps/demo/package.json`.
|
|
27
|
-
|
|
28
|
-
Start the production server with one command.
|
|
18
|
+
# Nx: Smart Monorepos · Fast CI
|
|
29
19
|
|
|
30
|
-
|
|
31
|
-
npx nx start demo
|
|
32
|
-
```
|
|
20
|
+
Nx is a build system with built-in tooling and advanced CI capabilities. It helps you maintain and scale monorepos, both locally and on CI.
|
|
33
21
|
|
|
34
|
-
|
|
22
|
+
This package is a [Remix plugin for Nx](https://nx.dev/packages/remix).
|
|
35
23
|
|
|
36
|
-
##
|
|
24
|
+
## Getting Started
|
|
37
25
|
|
|
38
|
-
|
|
26
|
+
### Creating an Nx Workspace
|
|
39
27
|
|
|
40
|
-
|
|
28
|
+
**Using `npx`**
|
|
41
29
|
|
|
42
30
|
```bash
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
# Or with yarn
|
|
46
|
-
yarn add -D @nx/remix
|
|
31
|
+
npx create-nx-workspace
|
|
47
32
|
```
|
|
48
33
|
|
|
49
|
-
|
|
34
|
+
**Using `npm init`**
|
|
50
35
|
|
|
51
36
|
```bash
|
|
52
|
-
|
|
37
|
+
npm init nx-workspace
|
|
53
38
|
```
|
|
54
39
|
|
|
55
|
-
|
|
40
|
+
**Using `yarn create`**
|
|
56
41
|
|
|
57
42
|
```bash
|
|
58
|
-
|
|
43
|
+
yarn create nx-workspace
|
|
59
44
|
```
|
|
60
45
|
|
|
61
|
-
|
|
46
|
+
### Adding Nx to an Existing Repository
|
|
62
47
|
|
|
63
|
-
|
|
48
|
+
Run:
|
|
64
49
|
|
|
65
50
|
```bash
|
|
66
|
-
npx nx
|
|
67
|
-
|
|
68
|
-
# e.g.
|
|
69
|
-
npx nx g route foo/bar --project=demo
|
|
51
|
+
npx nx@latest init
|
|
70
52
|
```
|
|
71
53
|
|
|
72
|
-
|
|
54
|
+
## Documentation & Resources
|
|
73
55
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
npx nx g @nx/remix:lib mylib
|
|
80
|
-
```
|
|
56
|
+
- [Nx.Dev: Documentation, Guides, Tutorials](https://nx.dev)
|
|
57
|
+
- [Intro to Nx](https://nx.dev/getting-started/intro)
|
|
58
|
+
- [Official Nx YouTube Channel](https://www.youtube.com/@NxDevtools)
|
|
59
|
+
- [Blog Posts About Nx](https://blog.nrwl.io/nx/home)
|
|
81
60
|
|
|
82
|
-
|
|
61
|
+
<p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-courses-and-videos.svg"
|
|
62
|
+
width="100%" alt="Nx - Smart Monorepos · Fast CI"></a></p>
|
|
83
63
|
|
|
84
|
-
```typescript jsx
|
|
85
|
-
// apps/demo/app/root.tsx
|
|
86
|
-
import { Mylib } from '@acme/mylib';
|
|
87
|
-
|
|
88
|
-
// ...
|
|
89
|
-
|
|
90
|
-
export default function App() {
|
|
91
|
-
return (
|
|
92
|
-
<Document>
|
|
93
|
-
<Layout>
|
|
94
|
-
<Mylib />
|
|
95
|
-
<Outlet />
|
|
96
|
-
</Layout>
|
|
97
|
-
</Document>
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
Now, run the dev server again to see the new library in action.
|
|
103
|
-
|
|
104
|
-
```bash
|
|
105
|
-
npx nx dev demo
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
**Note:** You must restart the server if you make any changes to your library. Luckily, with Nx cache this operation should be super fast.
|
|
109
|
-
|
|
110
|
-
## Contributing
|
|
111
|
-
|
|
112
|
-
### Running unit tests
|
|
113
|
-
|
|
114
|
-
Run `nx test demo` to execute the unit tests via [Jest](https://jestjs.io).
|
|
115
|
-
|
|
116
|
-
### Publishing
|
|
117
|
-
|
|
118
|
-
```bash
|
|
119
|
-
nx publish demo --ver=[version]
|
|
120
|
-
```
|
package/executors.json
CHANGED
|
@@ -10,17 +10,5 @@
|
|
|
10
10
|
"schema": "./src/executors/build/schema.json",
|
|
11
11
|
"description": "Build a Remix application."
|
|
12
12
|
}
|
|
13
|
-
},
|
|
14
|
-
"builders": {
|
|
15
|
-
"serve": {
|
|
16
|
-
"implementation": "./src/executors/serve/compat",
|
|
17
|
-
"schema": "./src/executors/serve/schema.json",
|
|
18
|
-
"description": "Serve a Remix application."
|
|
19
|
-
},
|
|
20
|
-
"build": {
|
|
21
|
-
"implementation": "./src/executors/build/build.impl",
|
|
22
|
-
"schema": "./src/executors/build/schema.json",
|
|
23
|
-
"description": "Build a Remix application."
|
|
24
|
-
}
|
|
25
13
|
}
|
|
26
14
|
}
|
package/generators.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from './src/generators/action/action.impl';
|
|
2
|
+
export * from './src/generators/application/application.impl';
|
|
3
|
+
export * from './src/generators/cypress-component-configuration/cypress-component-configuration.impl';
|
|
4
|
+
export * from './src/generators/cypress/cypress.impl';
|
|
5
|
+
export * from './src/generators/error-boundary/error-boundary.impl';
|
|
6
|
+
export * from './src/generators/library/library.impl';
|
|
7
|
+
export * from './src/generators/loader/loader.impl';
|
|
8
|
+
export * from './src/generators/meta/meta.impl';
|
|
9
|
+
export * from './src/generators/preset/preset.impl';
|
|
10
|
+
export * from './src/generators/resource-route/resource-route.impl';
|
|
11
|
+
export * from './src/generators/route/route.impl';
|
|
12
|
+
export * from './src/generators/setup-tailwind/setup-tailwind.impl';
|
|
13
|
+
export * from './src/generators/storybook-configuration/storybook-configuration.impl';
|
|
14
|
+
export * from './src/generators/style/style.impl';
|
package/generators.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./src/generators/action/action.impl"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./src/generators/application/application.impl"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./src/generators/cypress-component-configuration/cypress-component-configuration.impl"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./src/generators/cypress/cypress.impl"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./src/generators/error-boundary/error-boundary.impl"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./src/generators/library/library.impl"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./src/generators/loader/loader.impl"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./src/generators/meta/meta.impl"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./src/generators/preset/preset.impl"), exports);
|
|
13
|
+
tslib_1.__exportStar(require("./src/generators/resource-route/resource-route.impl"), exports);
|
|
14
|
+
tslib_1.__exportStar(require("./src/generators/route/route.impl"), exports);
|
|
15
|
+
tslib_1.__exportStar(require("./src/generators/setup-tailwind/setup-tailwind.impl"), exports);
|
|
16
|
+
tslib_1.__exportStar(require("./src/generators/storybook-configuration/storybook-configuration.impl"), exports);
|
|
17
|
+
tslib_1.__exportStar(require("./src/generators/style/style.impl"), exports);
|
package/generators.json
CHANGED
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
"$schema": "http://json-schema.org/schema",
|
|
3
3
|
"name": "NxRemix",
|
|
4
4
|
"version": "0.0.1",
|
|
5
|
-
"extends": [
|
|
6
|
-
"@nx/react"
|
|
7
|
-
],
|
|
5
|
+
"extends": ["@nx/react"],
|
|
8
6
|
"generators": {
|
|
9
7
|
"preset": {
|
|
10
8
|
"implementation": "./src/generators/preset/preset.impl",
|
|
@@ -22,9 +20,7 @@
|
|
|
22
20
|
"implementation": "./src/generators/application/application.impl",
|
|
23
21
|
"schema": "./src/generators/application/schema.json",
|
|
24
22
|
"description": "Generate a new Remix application",
|
|
25
|
-
"aliases": [
|
|
26
|
-
"app"
|
|
27
|
-
],
|
|
23
|
+
"aliases": ["app"],
|
|
28
24
|
"x-type": "application"
|
|
29
25
|
},
|
|
30
26
|
"cypress-component-configuration": {
|
|
@@ -36,9 +32,7 @@
|
|
|
36
32
|
"implementation": "./src/generators/library/library.impl",
|
|
37
33
|
"schema": "./src/generators/library/schema.json",
|
|
38
34
|
"description": "Generate a new library",
|
|
39
|
-
"aliases": [
|
|
40
|
-
"lib"
|
|
41
|
-
],
|
|
35
|
+
"aliases": ["lib"],
|
|
42
36
|
"x-type": "library"
|
|
43
37
|
},
|
|
44
38
|
"route": {
|
package/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createWatchPaths } from './src/utils/create-watch-paths';
|
package/index.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createWatchPaths = void 0;
|
|
4
|
+
var create_watch_paths_1 = require("./src/utils/create-watch-paths");
|
|
5
|
+
Object.defineProperty(exports, "createWatchPaths", { enumerable: true, get: function () { return create_watch_paths_1.createWatchPaths; } });
|
package/migrations.json
CHANGED
|
@@ -1,152 +1,52 @@
|
|
|
1
1
|
{
|
|
2
|
-
"generators": {
|
|
3
|
-
"update-tsconfig-and-remix-config-for-1-6-8": {
|
|
4
|
-
"version": "14.5.4",
|
|
5
|
-
"cli": "nx",
|
|
6
|
-
"description": "Update tsconfig.json and tsconfig.json to enable import of workspace libs",
|
|
7
|
-
"factory": "./src/migrations/update-14-5-4/update-tsconfig-and-remix-config-for-1-6-8"
|
|
8
|
-
},
|
|
9
|
-
"update-remix-env-config": {
|
|
10
|
-
"version": "15.8.6",
|
|
11
|
-
"cli": "nx",
|
|
12
|
-
"description": "Update remix.env.d.ts for node types import",
|
|
13
|
-
"factory": "./src/migrations/update-15-8-6/update-remix-env-d"
|
|
14
|
-
},
|
|
15
|
-
"update-16-0-0-add-nx-packages": {
|
|
16
|
-
"cli": "nx",
|
|
17
|
-
"version": "16.0.0-beta.1",
|
|
18
|
-
"description": "Replace @nrwl/remix with @nx/remix",
|
|
19
|
-
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages"
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
"schematics": {},
|
|
2
|
+
"generators": {},
|
|
23
3
|
"packageJsonUpdates": {
|
|
24
|
-
"
|
|
25
|
-
"version": "
|
|
26
|
-
"packages": {
|
|
27
|
-
"@remix-run/react": {
|
|
28
|
-
"version": "^1.6.8",
|
|
29
|
-
"alwaysAddToPackageJson": true
|
|
30
|
-
},
|
|
31
|
-
"@remix-run/node": {
|
|
32
|
-
"version": "^1.6.8",
|
|
33
|
-
"alwaysAddToPackageJson": true
|
|
34
|
-
},
|
|
35
|
-
"@remix-run/serve": {
|
|
36
|
-
"version": "^1.6.8",
|
|
37
|
-
"alwaysAddToPackageJson": true
|
|
38
|
-
},
|
|
39
|
-
"@remix-run/dev": {
|
|
40
|
-
"version": "^1.6.8",
|
|
41
|
-
"alwaysAddToPackageJson": true
|
|
42
|
-
},
|
|
43
|
-
"@remix-run/eslint-config": {
|
|
44
|
-
"version": "^1.6.8",
|
|
45
|
-
"alwaysAddToPackageJson": true
|
|
46
|
-
},
|
|
47
|
-
"react": {
|
|
48
|
-
"version": "^18.2.0",
|
|
49
|
-
"alwaysAddToPackageJson": true
|
|
50
|
-
},
|
|
51
|
-
"react-dom": {
|
|
52
|
-
"version": "^18.2.0",
|
|
53
|
-
"alwaysAddToPackageJson": true
|
|
54
|
-
},
|
|
55
|
-
"@types/react-dom": {
|
|
56
|
-
"version": "^18.0.6",
|
|
57
|
-
"alwaysAddToPackageJson": true
|
|
58
|
-
},
|
|
59
|
-
"@types/react": {
|
|
60
|
-
"version": "^18.0.15",
|
|
61
|
-
"alwaysAddToPackageJson": true
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
"15.8.6": {
|
|
66
|
-
"version": "15.8.6",
|
|
4
|
+
"17.2.1": {
|
|
5
|
+
"version": "17.2.1-beta.0",
|
|
67
6
|
"packages": {
|
|
68
7
|
"@remix-run/node": {
|
|
69
|
-
"version": "^
|
|
8
|
+
"version": "^2.3.0",
|
|
70
9
|
"alwaysAddToPackageJson": true
|
|
71
10
|
},
|
|
72
11
|
"@remix-run/react": {
|
|
73
|
-
"version": "^
|
|
12
|
+
"version": "^2.3.0",
|
|
74
13
|
"alwaysAddToPackageJson": true
|
|
75
14
|
},
|
|
76
15
|
"@remix-run/serve": {
|
|
77
|
-
"version": "^
|
|
16
|
+
"version": "^2.3.0",
|
|
78
17
|
"alwaysAddToPackageJson": true
|
|
79
18
|
},
|
|
80
19
|
"@remix-run/dev": {
|
|
81
|
-
"version": "^
|
|
82
|
-
"alwaysAddToPackageJson": true
|
|
83
|
-
},
|
|
84
|
-
"@remix-run/eslint-config": {
|
|
85
|
-
"version": "^1.14.0",
|
|
20
|
+
"version": "^2.3.0",
|
|
86
21
|
"alwaysAddToPackageJson": true
|
|
87
22
|
},
|
|
88
|
-
"@
|
|
89
|
-
"version": "^
|
|
23
|
+
"@remix-run/css-bundle": {
|
|
24
|
+
"version": "^2.3.0",
|
|
90
25
|
"alwaysAddToPackageJson": true
|
|
91
26
|
},
|
|
92
|
-
"@
|
|
93
|
-
"version": "^
|
|
27
|
+
"@remix-run/eslint-config": {
|
|
28
|
+
"version": "^2.3.0",
|
|
94
29
|
"alwaysAddToPackageJson": true
|
|
95
30
|
},
|
|
96
31
|
"isbot": {
|
|
97
|
-
"version": "^3.6.
|
|
98
|
-
"alwaysAddToPackageJson": true
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
"15.9.6": {
|
|
103
|
-
"@remix-run/node": {
|
|
104
|
-
"version": "^1.15.0",
|
|
105
|
-
"alwaysAddToPackageJson": true
|
|
106
|
-
},
|
|
107
|
-
"@remix-run/react": {
|
|
108
|
-
"version": "^1.15.0",
|
|
109
|
-
"alwaysAddToPackageJson": true
|
|
110
|
-
},
|
|
111
|
-
"@remix-run/serve": {
|
|
112
|
-
"version": "^1.15.0",
|
|
113
|
-
"alwaysAddToPackageJson": true
|
|
114
|
-
},
|
|
115
|
-
"@remix-run/dev": {
|
|
116
|
-
"version": "^1.15.0",
|
|
117
|
-
"alwaysAddToPackageJson": true
|
|
118
|
-
},
|
|
119
|
-
"@remix-run/eslint-config": {
|
|
120
|
-
"version": "^1.15.0",
|
|
121
|
-
"alwaysAddToPackageJson": true
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
"16.3.0": {
|
|
125
|
-
"version": "16.3.0",
|
|
126
|
-
"packages": {
|
|
127
|
-
"@remix-run/node": {
|
|
128
|
-
"version": "^1.16.1",
|
|
129
|
-
"alwaysAddToPackageJson": true
|
|
130
|
-
},
|
|
131
|
-
"@remix-run/react": {
|
|
132
|
-
"version": "^1.16.1",
|
|
32
|
+
"version": "^3.6.8",
|
|
133
33
|
"alwaysAddToPackageJson": true
|
|
134
34
|
},
|
|
135
|
-
"
|
|
136
|
-
"version": "^
|
|
35
|
+
"eslint": {
|
|
36
|
+
"version": "^8.38.0",
|
|
137
37
|
"alwaysAddToPackageJson": true
|
|
138
38
|
},
|
|
139
|
-
"@
|
|
140
|
-
"version": "^1.
|
|
141
|
-
"alwaysAddToPackageJson":
|
|
39
|
+
"@testing-library/react": {
|
|
40
|
+
"version": "^14.1.2",
|
|
41
|
+
"alwaysAddToPackageJson": false
|
|
142
42
|
},
|
|
143
|
-
"@
|
|
144
|
-
"version": "^1.
|
|
145
|
-
"alwaysAddToPackageJson":
|
|
43
|
+
"@testing-library/jest-dom": {
|
|
44
|
+
"version": "^6.1.4",
|
|
45
|
+
"alwaysAddToPackageJson": false
|
|
146
46
|
},
|
|
147
|
-
"
|
|
148
|
-
"version": "^
|
|
149
|
-
"alwaysAddToPackageJson":
|
|
47
|
+
"@testing-library/user-event": {
|
|
48
|
+
"version": "^14.5.1",
|
|
49
|
+
"alwaysAddToPackageJson": false
|
|
150
50
|
}
|
|
151
51
|
}
|
|
152
52
|
}
|
package/package.json
CHANGED
|
@@ -1,22 +1,51 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/remix",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
3
|
+
"version": "v17.2.5",
|
|
4
|
+
"description": "The Remix plugin for Nx contains executors and generators for managing Remix applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Jest, Cypress, and Storybook.\n\n- Generators for applications, libraries, routes, loaders, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/nrwl/nx.git",
|
|
8
|
+
"directory": "packages/remix"
|
|
9
|
+
},
|
|
10
|
+
"keywords": [
|
|
11
|
+
"Monorepo",
|
|
12
|
+
"Remix",
|
|
13
|
+
"React",
|
|
14
|
+
"Web",
|
|
15
|
+
"CLI"
|
|
16
|
+
],
|
|
17
|
+
"author": "Victor Savkin",
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/nrwl/nx/issues"
|
|
21
|
+
},
|
|
22
|
+
"homepage": "https://nx.dev",
|
|
23
|
+
"main": "./index.js",
|
|
24
|
+
"typings": "./index.d.ts",
|
|
5
25
|
"generators": "./generators.json",
|
|
6
26
|
"executors": "./executors.json",
|
|
27
|
+
"nx-migrations": {
|
|
28
|
+
"migrations": "./migrations.json"
|
|
29
|
+
},
|
|
7
30
|
"dependencies": {
|
|
8
|
-
"@nx/devkit": "
|
|
9
|
-
"@nx/js": "
|
|
10
|
-
"@nx/react": "
|
|
11
|
-
"@nx/web": "17.0.1",
|
|
12
|
-
"@phenomnomnominal/tsquery": "^5.0.1",
|
|
31
|
+
"@nx/devkit": "v17.2.5",
|
|
32
|
+
"@nx/js": "v17.2.5",
|
|
33
|
+
"@nx/react": "v17.2.5",
|
|
13
34
|
"tslib": "^2.3.1",
|
|
14
|
-
"
|
|
15
|
-
"@nrwl/remix": "
|
|
35
|
+
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
36
|
+
"@nrwl/remix": "v17.2.5"
|
|
16
37
|
},
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
"
|
|
38
|
+
"peerDependencies": {},
|
|
39
|
+
"publishConfig": {
|
|
40
|
+
"access": "public"
|
|
41
|
+
},
|
|
42
|
+
"exports": {
|
|
43
|
+
"./package.json": "./package.json",
|
|
44
|
+
".": "./index.js",
|
|
45
|
+
"./executors.json": "./executors.json",
|
|
46
|
+
"./generators.json": "./generators.json",
|
|
47
|
+
"./migrations.json": "./migrations.json",
|
|
48
|
+
"./generators": "./generators.js"
|
|
20
49
|
},
|
|
21
50
|
"type": "commonjs"
|
|
22
|
-
}
|
|
51
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.nxComponentTestingPreset = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const cypress_preset_1 = require("@nx/cypress/plugins/cypress-preset");
|
|
6
5
|
const devkit_1 = require("@nx/devkit");
|
|
7
6
|
const fs_1 = require("fs");
|
|
@@ -27,10 +26,15 @@ function nxComponentTestingPreset(pathToConfig) {
|
|
|
27
26
|
const normalizedProjectRootPath = ['.ts', '.js'].some((ext) => pathToConfig.endsWith(ext))
|
|
28
27
|
? pathToConfig
|
|
29
28
|
: (0, path_1.dirname)(pathToConfig);
|
|
30
|
-
return
|
|
29
|
+
return {
|
|
30
|
+
...(0, cypress_preset_1.nxBaseCypressPreset)(pathToConfig),
|
|
31
|
+
specPattern: 'src/**/*.cy.{js,jsx,ts,tsx}',
|
|
32
|
+
devServer: {
|
|
33
|
+
...{ framework: 'react', bundler: 'vite' },
|
|
34
|
+
viteConfig: async () => {
|
|
31
35
|
const viteConfigPath = findViteConfig(normalizedProjectRootPath);
|
|
32
|
-
const { mergeConfig, loadConfigFromFile, searchForWorkspaceRoot } =
|
|
33
|
-
const resolved =
|
|
36
|
+
const { mergeConfig, loadConfigFromFile, searchForWorkspaceRoot } = await Promise.resolve().then(() => require('vite'));
|
|
37
|
+
const resolved = await loadConfigFromFile({
|
|
34
38
|
mode: 'watch',
|
|
35
39
|
command: 'serve',
|
|
36
40
|
}, viteConfigPath);
|
|
@@ -45,7 +49,9 @@ function nxComponentTestingPreset(pathToConfig) {
|
|
|
45
49
|
},
|
|
46
50
|
},
|
|
47
51
|
});
|
|
48
|
-
}
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
};
|
|
49
55
|
}
|
|
50
56
|
exports.nxComponentTestingPreset = nxComponentTestingPreset;
|
|
51
57
|
function findViteConfig(projectRootFullPath) {
|
|
@@ -56,4 +62,3 @@ function findViteConfig(projectRootFullPath) {
|
|
|
56
62
|
}
|
|
57
63
|
}
|
|
58
64
|
}
|
|
59
|
-
//# sourceMappingURL=index.js.map
|