@nx/remix 17.0.0 → 17.0.4

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 (202) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +32 -89
  3. package/executors.json +0 -12
  4. package/generators.d.ts +14 -0
  5. package/generators.js +31 -0
  6. package/generators.json +14 -19
  7. package/index.d.ts +1 -0
  8. package/index.js +5 -0
  9. package/migrations.json +68 -86
  10. package/package.json +44 -13
  11. package/plugin.d.ts +1 -0
  12. package/plugin.js +6 -0
  13. package/plugins/component-testing/index.js +11 -6
  14. package/src/executors/build/build.impl.js +64 -74
  15. package/src/executors/build/schema.json +1 -1
  16. package/src/executors/serve/serve.impl.js +43 -43
  17. package/src/generators/action/action.impl.js +24 -26
  18. package/src/generators/action/schema.d.ts +7 -1
  19. package/src/generators/action/schema.json +11 -8
  20. package/src/generators/application/__snapshots__/application.impl.spec.ts.snap +1119 -305
  21. package/src/generators/application/application.impl.d.ts +3 -1
  22. package/src/generators/application/application.impl.js +171 -110
  23. package/src/generators/application/files/common/app/nx-welcome.tsx__tmpl__ +886 -0
  24. package/src/generators/application/files/common/app/root.tsx__tmpl__ +3 -3
  25. package/src/generators/application/files/common/app/routes/_index.tsx__tmpl__ +9 -0
  26. package/src/generators/application/files/common/remix.config.js__tmpl__ +13 -7
  27. package/src/generators/application/files/common/tests/routes/_index.spec.tsx__tmpl__ +16 -0
  28. package/src/generators/application/files/common/tsconfig.app.json__tmpl__ +20 -0
  29. package/src/generators/application/files/common/tsconfig.json__tmpl__ +20 -14
  30. package/src/generators/application/files/integrated/package.json__tmpl__ +1 -0
  31. package/src/generators/application/lib/add-e2e.d.ts +3 -0
  32. package/src/generators/application/lib/add-e2e.js +68 -0
  33. package/src/generators/application/lib/index.d.ts +1 -0
  34. package/src/generators/application/lib/index.js +1 -1
  35. package/src/generators/application/lib/normalize-options.d.ts +8 -3
  36. package/src/generators/application/lib/normalize-options.js +52 -14
  37. package/src/generators/application/lib/update-unit-test-config.d.ts +1 -1
  38. package/src/generators/application/lib/update-unit-test-config.js +32 -7
  39. package/src/generators/application/schema.d.ts +7 -1
  40. package/src/generators/application/schema.json +17 -11
  41. package/src/generators/cypress-component-configuration/cypress-component-configuration.impl.d.ts +3 -1
  42. package/src/generators/cypress-component-configuration/cypress-component-configuration.impl.js +26 -17
  43. package/src/generators/cypress-component-configuration/schema.d.ts +1 -0
  44. package/src/generators/error-boundary/__snapshots__/error-boundary.impl.spec.ts.snap +39 -27
  45. package/src/generators/error-boundary/error-boundary.impl.js +6 -15
  46. package/src/generators/error-boundary/lib/add-v2-error-boundary.js +11 -16
  47. package/src/generators/error-boundary/lib/index.d.ts +0 -1
  48. package/src/generators/error-boundary/lib/index.js +0 -2
  49. package/src/generators/error-boundary/lib/normalize-options.d.ts +1 -1
  50. package/src/generators/error-boundary/lib/normalize-options.js +9 -5
  51. package/src/generators/error-boundary/schema.d.ts +7 -2
  52. package/src/generators/error-boundary/schema.json +14 -16
  53. package/src/generators/init/init.d.ts +5 -0
  54. package/src/generators/init/init.js +60 -0
  55. package/src/generators/init/schema.d.ts +7 -0
  56. package/src/generators/init/schema.json +33 -0
  57. package/src/generators/library/__snapshots__/library.impl.spec.ts.snap +157 -0
  58. package/src/generators/library/lib/add-tsconfig-entry-points.js +0 -1
  59. package/src/generators/library/lib/add-unit-testing.js +5 -7
  60. package/src/generators/library/lib/index.js +0 -1
  61. package/src/generators/library/lib/normalize-options.d.ts +3 -2
  62. package/src/generators/library/lib/normalize-options.js +21 -11
  63. package/src/generators/library/lib/update-buildable-config.js +5 -2
  64. package/src/generators/library/library.impl.d.ts +3 -1
  65. package/src/generators/library/library.impl.js +37 -33
  66. package/src/generators/library/schema.d.ts +3 -0
  67. package/src/generators/library/schema.json +7 -1
  68. package/src/generators/loader/loader.impl.js +24 -26
  69. package/src/generators/loader/schema.d.ts +7 -1
  70. package/src/generators/loader/schema.json +11 -8
  71. package/src/generators/meta/lib/v2.impl.js +14 -16
  72. package/src/generators/meta/meta.impl.js +2 -17
  73. package/src/generators/meta/schema.d.ts +7 -2
  74. package/src/generators/meta/schema.json +11 -12
  75. package/src/generators/preset/lib/normalize-options.js +5 -3
  76. package/src/generators/preset/preset.impl.js +22 -23
  77. package/src/generators/preset/schema.json +2 -1
  78. package/src/generators/resource-route/__snapshots__/resource-route.impl.spec.ts.snap +21 -0
  79. package/src/generators/resource-route/resource-route.impl.js +32 -26
  80. package/src/generators/resource-route/schema.d.ts +7 -1
  81. package/src/generators/resource-route/schema.json +11 -8
  82. package/src/generators/route/__snapshots__/route.impl.spec.ts.snap +62 -9
  83. package/src/generators/route/route.impl.js +56 -43
  84. package/src/generators/route/schema.d.ts +7 -1
  85. package/src/generators/route/schema.json +12 -9
  86. package/src/generators/setup/schema.json +2 -1
  87. package/src/generators/setup/setup.impl.js +23 -23
  88. package/src/generators/setup-tailwind/__snapshots__/setup-tailwind.impl.spec.ts.snap +51 -33
  89. package/src/generators/setup-tailwind/lib/index.js +0 -1
  90. package/src/generators/setup-tailwind/lib/update-remix-config.js +3 -7
  91. package/src/generators/setup-tailwind/schema.json +2 -1
  92. package/src/generators/setup-tailwind/setup-tailwind.impl.js +25 -29
  93. package/src/generators/storybook-configuration/__snapshots__/storybook-configuration.impl.spec.ts.snap +15 -27
  94. package/src/generators/storybook-configuration/schema.d.ts +2 -1
  95. package/src/generators/storybook-configuration/schema.json +5 -12
  96. package/src/generators/storybook-configuration/storybook-configuration.impl.d.ts +2 -1
  97. package/src/generators/storybook-configuration/storybook-configuration.impl.js +19 -12
  98. package/src/generators/style/schema.d.ts +7 -1
  99. package/src/generators/style/schema.json +13 -10
  100. package/src/generators/style/style.impl.js +32 -24
  101. package/src/generators/utils/update-dependencies.d.ts +2 -0
  102. package/src/generators/utils/update-dependencies.js +21 -0
  103. package/src/plugins/__snapshots__/plugin.spec.ts.snap +113 -0
  104. package/src/plugins/plugin.d.ts +9 -0
  105. package/src/plugins/plugin.js +134 -0
  106. package/src/utils/create-watch-paths.js +8 -13
  107. package/src/utils/get-default-export-name.js +1 -3
  108. package/src/utils/get-default-export.js +0 -1
  109. package/src/utils/insert-import.js +0 -1
  110. package/src/utils/insert-statement-after-imports.js +0 -1
  111. package/src/utils/insert-statement-in-default-function.js +0 -1
  112. package/src/utils/remix-config.d.ts +2 -2
  113. package/src/utils/remix-config.js +34 -11
  114. package/src/utils/remix-route-utils.d.ts +2 -2
  115. package/src/utils/remix-route-utils.js +23 -17
  116. package/src/utils/testing-config-utils.d.ts +3 -2
  117. package/src/utils/testing-config-utils.js +24 -10
  118. package/src/utils/upsert-links-function.js +0 -1
  119. package/src/utils/versions.d.ts +10 -9
  120. package/src/utils/versions.js +15 -15
  121. package/plugins/component-testing/index.js.map +0 -1
  122. package/src/executors/build/build.impl.js.map +0 -1
  123. package/src/executors/build/compat.d.ts +0 -2
  124. package/src/executors/build/compat.js +0 -6
  125. package/src/executors/build/compat.js.map +0 -1
  126. package/src/executors/serve/compat.d.ts +0 -2
  127. package/src/executors/serve/compat.js +0 -6
  128. package/src/executors/serve/compat.js.map +0 -1
  129. package/src/executors/serve/serve.impl.js.map +0 -1
  130. package/src/generators/action/action.impl.js.map +0 -1
  131. package/src/generators/application/application.impl.js.map +0 -1
  132. package/src/generators/application/files/common/app/routes/index.tsx__tmpl__ +0 -32
  133. package/src/generators/application/lib/index.js.map +0 -1
  134. package/src/generators/application/lib/normalize-options.js.map +0 -1
  135. package/src/generators/application/lib/update-unit-test-config.js.map +0 -1
  136. package/src/generators/cypress/cypress.impl.d.ts +0 -3
  137. package/src/generators/cypress/cypress.impl.js +0 -67
  138. package/src/generators/cypress/cypress.impl.js.map +0 -1
  139. package/src/generators/cypress/schema.d.ts +0 -10
  140. package/src/generators/cypress/schema.json +0 -55
  141. package/src/generators/cypress-component-configuration/cypress-component-configuration.impl.js.map +0 -1
  142. package/src/generators/error-boundary/error-boundary.impl.js.map +0 -1
  143. package/src/generators/error-boundary/lib/add-v1-error-boundary.d.ts +0 -3
  144. package/src/generators/error-boundary/lib/add-v1-error-boundary.js +0 -21
  145. package/src/generators/error-boundary/lib/add-v1-error-boundary.js.map +0 -1
  146. package/src/generators/error-boundary/lib/add-v2-error-boundary.js.map +0 -1
  147. package/src/generators/error-boundary/lib/index.js.map +0 -1
  148. package/src/generators/error-boundary/lib/normalize-options.js.map +0 -1
  149. package/src/generators/library/lib/add-tsconfig-entry-points.js.map +0 -1
  150. package/src/generators/library/lib/add-unit-testing.js.map +0 -1
  151. package/src/generators/library/lib/index.js.map +0 -1
  152. package/src/generators/library/lib/normalize-options.js.map +0 -1
  153. package/src/generators/library/lib/update-buildable-config.js.map +0 -1
  154. package/src/generators/library/library.impl.js.map +0 -1
  155. package/src/generators/loader/loader.impl.js.map +0 -1
  156. package/src/generators/meta/lib/normalize-options.d.ts +0 -3
  157. package/src/generators/meta/lib/normalize-options.js +0 -15
  158. package/src/generators/meta/lib/normalize-options.js.map +0 -1
  159. package/src/generators/meta/lib/v1.impl.d.ts +0 -3
  160. package/src/generators/meta/lib/v1.impl.js +0 -30
  161. package/src/generators/meta/lib/v1.impl.js.map +0 -1
  162. package/src/generators/meta/lib/v2.impl.js.map +0 -1
  163. package/src/generators/meta/meta.impl.js.map +0 -1
  164. package/src/generators/preset/lib/normalize-options.js.map +0 -1
  165. package/src/generators/preset/preset.impl.js.map +0 -1
  166. package/src/generators/resource-route/resource-route.impl.js.map +0 -1
  167. package/src/generators/route/route.impl.js.map +0 -1
  168. package/src/generators/setup/setup.impl.js.map +0 -1
  169. package/src/generators/setup-tailwind/lib/index.js.map +0 -1
  170. package/src/generators/setup-tailwind/lib/update-remix-config.js.map +0 -1
  171. package/src/generators/setup-tailwind/setup-tailwind.impl.js.map +0 -1
  172. package/src/generators/storybook-configuration/storybook-configuration.impl.js.map +0 -1
  173. package/src/generators/style/style.impl.js.map +0 -1
  174. package/src/index.d.ts +0 -15
  175. package/src/index.js +0 -21
  176. package/src/index.js.map +0 -1
  177. package/src/migrations/update-14-5-4/update-tsconfig-and-remix-config-for-1-6-8.d.ts +0 -6
  178. package/src/migrations/update-14-5-4/update-tsconfig-and-remix-config-for-1-6-8.js +0 -45
  179. package/src/migrations/update-14-5-4/update-tsconfig-and-remix-config-for-1-6-8.js.map +0 -1
  180. package/src/migrations/update-15-8-6/update-remix-env-d.d.ts +0 -6
  181. package/src/migrations/update-15-8-6/update-remix-env-d.js +0 -27
  182. package/src/migrations/update-15-8-6/update-remix-env-d.js.map +0 -1
  183. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +0 -2
  184. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +0 -13
  185. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js.map +0 -1
  186. package/src/utils/create-watch-paths.js.map +0 -1
  187. package/src/utils/get-default-export-name.js.map +0 -1
  188. package/src/utils/get-default-export.js.map +0 -1
  189. package/src/utils/get-remix-projects.d.ts +0 -2
  190. package/src/utils/get-remix-projects.js +0 -15
  191. package/src/utils/get-remix-projects.js.map +0 -1
  192. package/src/utils/insert-import.js.map +0 -1
  193. package/src/utils/insert-statement-after-imports.js.map +0 -1
  194. package/src/utils/insert-statement-in-default-function.js.map +0 -1
  195. package/src/utils/project.d.ts +0 -2
  196. package/src/utils/project.js +0 -15
  197. package/src/utils/project.js.map +0 -1
  198. package/src/utils/remix-config.js.map +0 -1
  199. package/src/utils/remix-route-utils.js.map +0 -1
  200. package/src/utils/testing-config-utils.js.map +0 -1
  201. package/src/utils/upsert-links-function.js.map +0 -1
  202. package/src/utils/versions.js.map +0 -1
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  (The MIT License)
2
2
 
3
- Copyright (c) 2017-2023 Narwhal Technologies Inc.
3
+ Copyright (c) 2017-2024 Narwhal Technologies Inc.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
package/README.md CHANGED
@@ -1,120 +1,63 @@
1
- <p style="text-align: center;"><img src="https://github.com/nrwl/nx-labs/raw/main/packages/remix/nx-remix.png" width="600" alt="Nx - Smart, Fast and Extensible Build System"></p>
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
- Next generation full stack framework and build system together. Build better websites with [Remix](https://remix.run/) and [Nx](https://nx.dev).
3
+ <div style="text-align: center;">
4
4
 
5
- Nx makes supercharges your builds, and the optional [Nx Cloud](https://nx.app) provide out-of-the-box distributed caching, distributed task execution, and valuable workspace insights.
5
+ [![CircleCI](https://circleci.com/gh/nrwl/nx.svg?style=svg)](https://circleci.com/gh/nrwl/nx)
6
+ [![License](https://img.shields.io/npm/l/@nx/workspace.svg?style=flat-square)]()
7
+ [![NPM Version](https://badge.fury.io/js/%40nrwl%2Fworkspace.svg)](https://www.npmjs.com/@nx/workspace)
8
+ [![Semantic Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)]()
9
+ [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
10
+ [![Join the chat at https://gitter.im/nrwl-nx/community](https://badges.gitter.im/nrwl-nx/community.svg)](https://gitter.im/nrwl-nx/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
11
+ [![Join us on the Official Nx Discord Server](https://img.shields.io/discord/1143497901675401286?label=discord)](https://go.nx.dev/community)
6
12
 
7
- ## Creating new Remix workspace
13
+ </div>
8
14
 
9
- Use `--preset=@nx/remix` when creating new workspace.
10
15
 
11
- e.g.
16
+ <hr>
12
17
 
13
- ```bash
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
- ```bash
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
- **Note:** This will run the build before starting (as defined in `nx.json`).
22
+ This package is a [Remix plugin for Nx](https://nx.dev/packages/remix).
35
23
 
36
- ## Existing workspaces
24
+ ## Getting Started
37
25
 
38
- You can add Remix to any existing Nx workspace.
26
+ ### Creating an Nx Workspace
39
27
 
40
- First, install the plugin:
28
+ **Using `npx`**
41
29
 
42
30
  ```bash
43
- npm install --save-dev @nx/remix
44
-
45
- # Or with yarn
46
- yarn add -D @nx/remix
31
+ npx create-nx-workspace
47
32
  ```
48
33
 
49
- Then, run the setup generator:
34
+ **Using `npm init`**
50
35
 
51
36
  ```bash
52
- npx nx g @nx/remix:setup
37
+ npm init nx-workspace
53
38
  ```
54
39
 
55
- You can then add your first app and run it:
40
+ **Using `yarn create`**
56
41
 
57
42
  ```bash
58
- npx nx g @nx/remix:app demo
43
+ yarn create nx-workspace
59
44
  ```
60
45
 
61
- ## Adding new routes
46
+ ### Adding Nx to an Existing Repository
62
47
 
63
- Add a new route with one command.
48
+ Run:
64
49
 
65
50
  ```bash
66
- npx nx g route
67
-
68
- # e.g.
69
- npx nx g route foo/bar --project=demo
51
+ npx nx@latest init
70
52
  ```
71
53
 
72
- Browse to `http://localhost:3000/foo/bar` to see the new route.
54
+ ## Documentation & Resources
73
55
 
74
- ## Workspace libraries
75
-
76
- The Remix setup leverages npm/yarn/pnpm workspaces and Nx buildable libraries.
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
- Import the new library in your app.
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
  }
@@ -0,0 +1,14 @@
1
+ export { default as actionGenerator } from './src/generators/action/action.impl';
2
+ export { default as applicationGenerator } from './src/generators/application/application.impl';
3
+ export { default as cypressComponentConfigurationGenerator } from './src/generators/cypress-component-configuration/cypress-component-configuration.impl';
4
+ export { default as errorBoundaryGenerator } from './src/generators/error-boundary/error-boundary.impl';
5
+ export { default as libraryGenerator } from './src/generators/library/library.impl';
6
+ export { default as loaderGenerator } from './src/generators/loader/loader.impl';
7
+ export { default as metaGenerator } from './src/generators/meta/meta.impl';
8
+ export { default as presetGenerator } from './src/generators/preset/preset.impl';
9
+ export { default as resourceRouteGenerator } from './src/generators/resource-route/resource-route.impl';
10
+ export { default as routeGenerator } from './src/generators/route/route.impl';
11
+ export { default as setupTailwindGenerator } from './src/generators/setup-tailwind/setup-tailwind.impl';
12
+ export { default as storybookConfigurationGenerator } from './src/generators/storybook-configuration/storybook-configuration.impl';
13
+ export { default as styleGenerator } from './src/generators/style/style.impl';
14
+ export { default as initGenerator } from './src/generators/init/init';
package/generators.js ADDED
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.initGenerator = exports.styleGenerator = exports.storybookConfigurationGenerator = exports.setupTailwindGenerator = exports.routeGenerator = exports.resourceRouteGenerator = exports.presetGenerator = exports.metaGenerator = exports.loaderGenerator = exports.libraryGenerator = exports.errorBoundaryGenerator = exports.cypressComponentConfigurationGenerator = exports.applicationGenerator = exports.actionGenerator = void 0;
4
+ var action_impl_1 = require("./src/generators/action/action.impl");
5
+ Object.defineProperty(exports, "actionGenerator", { enumerable: true, get: function () { return action_impl_1.default; } });
6
+ var application_impl_1 = require("./src/generators/application/application.impl");
7
+ Object.defineProperty(exports, "applicationGenerator", { enumerable: true, get: function () { return application_impl_1.default; } });
8
+ var cypress_component_configuration_impl_1 = require("./src/generators/cypress-component-configuration/cypress-component-configuration.impl");
9
+ Object.defineProperty(exports, "cypressComponentConfigurationGenerator", { enumerable: true, get: function () { return cypress_component_configuration_impl_1.default; } });
10
+ var error_boundary_impl_1 = require("./src/generators/error-boundary/error-boundary.impl");
11
+ Object.defineProperty(exports, "errorBoundaryGenerator", { enumerable: true, get: function () { return error_boundary_impl_1.default; } });
12
+ var library_impl_1 = require("./src/generators/library/library.impl");
13
+ Object.defineProperty(exports, "libraryGenerator", { enumerable: true, get: function () { return library_impl_1.default; } });
14
+ var loader_impl_1 = require("./src/generators/loader/loader.impl");
15
+ Object.defineProperty(exports, "loaderGenerator", { enumerable: true, get: function () { return loader_impl_1.default; } });
16
+ var meta_impl_1 = require("./src/generators/meta/meta.impl");
17
+ Object.defineProperty(exports, "metaGenerator", { enumerable: true, get: function () { return meta_impl_1.default; } });
18
+ var preset_impl_1 = require("./src/generators/preset/preset.impl");
19
+ Object.defineProperty(exports, "presetGenerator", { enumerable: true, get: function () { return preset_impl_1.default; } });
20
+ var resource_route_impl_1 = require("./src/generators/resource-route/resource-route.impl");
21
+ Object.defineProperty(exports, "resourceRouteGenerator", { enumerable: true, get: function () { return resource_route_impl_1.default; } });
22
+ var route_impl_1 = require("./src/generators/route/route.impl");
23
+ Object.defineProperty(exports, "routeGenerator", { enumerable: true, get: function () { return route_impl_1.default; } });
24
+ var setup_tailwind_impl_1 = require("./src/generators/setup-tailwind/setup-tailwind.impl");
25
+ Object.defineProperty(exports, "setupTailwindGenerator", { enumerable: true, get: function () { return setup_tailwind_impl_1.default; } });
26
+ var storybook_configuration_impl_1 = require("./src/generators/storybook-configuration/storybook-configuration.impl");
27
+ Object.defineProperty(exports, "storybookConfigurationGenerator", { enumerable: true, get: function () { return storybook_configuration_impl_1.default; } });
28
+ var style_impl_1 = require("./src/generators/style/style.impl");
29
+ Object.defineProperty(exports, "styleGenerator", { enumerable: true, get: function () { return style_impl_1.default; } });
30
+ var init_1 = require("./src/generators/init/init");
31
+ Object.defineProperty(exports, "initGenerator", { enumerable: true, get: function () { return init_1.default; } });
package/generators.json CHANGED
@@ -1,10 +1,8 @@
1
1
  {
2
- "$schema": "http://json-schema.org/schema",
2
+ "$schema": "https://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",
@@ -19,28 +17,30 @@
19
17
  "hidden": true
20
18
  },
21
19
  "application": {
22
- "implementation": "./src/generators/application/application.impl",
20
+ "implementation": "./src/generators/application/application.impl#remixApplicationGeneratorInternal",
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": {
31
- "implementation": "./src/generators/cypress-component-configuration/cypress-component-configuration.impl",
27
+ "implementation": "./src/generators/cypress-component-configuration/cypress-component-configuration.impl#cypressComponentConfigurationGeneratorInternal",
32
28
  "schema": "./src/generators/cypress-component-configuration/schema.json",
33
29
  "description": "Generate a Cypress Component Testing configuration for a Remix project"
34
30
  },
35
31
  "library": {
36
- "implementation": "./src/generators/library/library.impl",
32
+ "implementation": "./src/generators/library/library.impl#remixLibraryGeneratorInternal",
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
  },
38
+ "init": {
39
+ "implementation": "./src/generators/init/init#remixInitGeneratorInternal",
40
+ "schema": "./src/generators/init/schema.json",
41
+ "description": "Initialize the `@nx/remix` plugin.",
42
+ "hidden": true
43
+ },
44
44
  "route": {
45
45
  "implementation": "./src/generators/route/route.impl",
46
46
  "schema": "./src/generators/route/schema.json",
@@ -72,7 +72,7 @@
72
72
  "description": "Generates a TailwindCSS configuration for the Remix application"
73
73
  },
74
74
  "storybook-configuration": {
75
- "implementation": "./src/generators/storybook-configuration/storybook-configuration.impl",
75
+ "implementation": "./src/generators/storybook-configuration/storybook-configuration.impl#remixStorybookConfiguration",
76
76
  "schema": "./src/generators/storybook-configuration/schema.json",
77
77
  "description": "Generates a Storybook configuration for a Remix application"
78
78
  },
@@ -85,11 +85,6 @@
85
85
  "implementation": "./src/generators/error-boundary/error-boundary.impl",
86
86
  "schema": "./src/generators/error-boundary/schema.json",
87
87
  "description": "Add an ErrorBoundary to an existing route"
88
- },
89
- "cypress": {
90
- "implementation": "./src/generators/cypress/cypress.impl",
91
- "schema": "./src/generators/cypress/schema.json",
92
- "description": "Generate a project for testing Remix apps using Cypress"
93
88
  }
94
89
  }
95
90
  }
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,151 +1,133 @@
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
- "14.5.4": {
25
- "version": "14.5.4",
4
+ "17.2.1": {
5
+ "version": "17.2.1-beta.0",
26
6
  "packages": {
27
- "@remix-run/react": {
28
- "version": "^1.6.8",
7
+ "@remix-run/node": {
8
+ "version": "^2.3.0",
29
9
  "alwaysAddToPackageJson": true
30
10
  },
31
- "@remix-run/node": {
32
- "version": "^1.6.8",
11
+ "@remix-run/react": {
12
+ "version": "^2.3.0",
33
13
  "alwaysAddToPackageJson": true
34
14
  },
35
15
  "@remix-run/serve": {
36
- "version": "^1.6.8",
16
+ "version": "^2.3.0",
37
17
  "alwaysAddToPackageJson": true
38
18
  },
39
19
  "@remix-run/dev": {
40
- "version": "^1.6.8",
20
+ "version": "^2.3.0",
41
21
  "alwaysAddToPackageJson": true
42
22
  },
43
- "@remix-run/eslint-config": {
44
- "version": "^1.6.8",
23
+ "@remix-run/css-bundle": {
24
+ "version": "^2.3.0",
45
25
  "alwaysAddToPackageJson": true
46
26
  },
47
- "react": {
48
- "version": "^18.2.0",
27
+ "@remix-run/eslint-config": {
28
+ "version": "^2.3.0",
49
29
  "alwaysAddToPackageJson": true
50
30
  },
51
- "react-dom": {
52
- "version": "^18.2.0",
31
+ "isbot": {
32
+ "version": "^3.6.8",
53
33
  "alwaysAddToPackageJson": true
54
34
  },
55
- "@types/react-dom": {
56
- "version": "^18.0.6",
35
+ "eslint": {
36
+ "version": "^8.38.0",
57
37
  "alwaysAddToPackageJson": true
58
38
  },
59
- "@types/react": {
60
- "version": "^18.0.15",
61
- "alwaysAddToPackageJson": true
39
+ "@testing-library/react": {
40
+ "version": "^14.1.2",
41
+ "alwaysAddToPackageJson": false
42
+ },
43
+ "@testing-library/jest-dom": {
44
+ "version": "^6.1.4",
45
+ "alwaysAddToPackageJson": false
46
+ },
47
+ "@testing-library/user-event": {
48
+ "version": "^14.5.1",
49
+ "alwaysAddToPackageJson": false
62
50
  }
63
51
  }
64
52
  },
65
- "15.8.6": {
66
- "version": "15.8.6",
53
+ "18.1.0": {
54
+ "version": "18.1.0-beta.1",
67
55
  "packages": {
68
56
  "@remix-run/node": {
69
- "version": "^1.14.0",
57
+ "version": "^2.6.0",
70
58
  "alwaysAddToPackageJson": true
71
59
  },
72
60
  "@remix-run/react": {
73
- "version": "^1.14.0",
61
+ "version": "^2.6.0",
74
62
  "alwaysAddToPackageJson": true
75
63
  },
76
64
  "@remix-run/serve": {
77
- "version": "^1.14.0",
65
+ "version": "^2.6.0",
78
66
  "alwaysAddToPackageJson": true
79
67
  },
80
68
  "@remix-run/dev": {
81
- "version": "^1.14.0",
69
+ "version": "^2.6.0",
82
70
  "alwaysAddToPackageJson": true
83
71
  },
84
- "@remix-run/eslint-config": {
85
- "version": "^1.14.0",
72
+ "@remix-run/css-bundle": {
73
+ "version": "^2.6.0",
86
74
  "alwaysAddToPackageJson": true
87
75
  },
88
- "@types/react-dom": {
89
- "version": "^18.0.8",
76
+ "@remix-run/eslint-config": {
77
+ "version": "^2.6.0",
90
78
  "alwaysAddToPackageJson": true
91
79
  },
92
- "@types/react": {
93
- "version": "^18.0.25",
80
+ "isbot": {
81
+ "version": "^4.4.0",
94
82
  "alwaysAddToPackageJson": true
95
83
  },
96
- "isbot": {
97
- "version": "^3.6.5",
84
+ "eslint": {
85
+ "version": "^8.56.0",
98
86
  "alwaysAddToPackageJson": true
87
+ },
88
+ "@testing-library/react": {
89
+ "version": "^14.1.2",
90
+ "alwaysAddToPackageJson": false
91
+ },
92
+ "@testing-library/jest-dom": {
93
+ "version": "^6.2.0",
94
+ "alwaysAddToPackageJson": false
95
+ },
96
+ "@testing-library/user-event": {
97
+ "version": "^14.5.2",
98
+ "alwaysAddToPackageJson": false
99
+ },
100
+ "typescript": {
101
+ "version": "^5.3.3",
102
+ "alwaysAddToPackageJson": false
99
103
  }
100
104
  }
101
105
  },
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",
106
+ "18.1.1": {
107
+ "version": "18.1.1-beta.0",
126
108
  "packages": {
127
109
  "@remix-run/node": {
128
- "version": "^1.16.1",
110
+ "version": "^2.8.0",
129
111
  "alwaysAddToPackageJson": true
130
112
  },
131
113
  "@remix-run/react": {
132
- "version": "^1.16.1",
114
+ "version": "^2.8.0",
133
115
  "alwaysAddToPackageJson": true
134
116
  },
135
117
  "@remix-run/serve": {
136
- "version": "^1.16.1",
118
+ "version": "^2.8.0",
137
119
  "alwaysAddToPackageJson": true
138
120
  },
139
121
  "@remix-run/dev": {
140
- "version": "^1.16.1",
122
+ "version": "^2.8.0",
141
123
  "alwaysAddToPackageJson": true
142
124
  },
143
- "@remix-run/eslint-config": {
144
- "version": "^1.16.1",
125
+ "@remix-run/css-bundle": {
126
+ "version": "^2.8.0",
145
127
  "alwaysAddToPackageJson": true
146
128
  },
147
- "isbot": {
148
- "version": "^3.6.8",
129
+ "@remix-run/eslint-config": {
130
+ "version": "^2.8.0",
149
131
  "alwaysAddToPackageJson": true
150
132
  }
151
133
  }
package/package.json CHANGED
@@ -1,22 +1,53 @@
1
1
  {
2
2
  "name": "@nx/remix",
3
- "version": "17.0.0",
4
- "main": "./src/index.js",
3
+ "version": "17.0.4",
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": "^17.0.1",
9
- "@nx/js": "^17.0.1",
10
- "@nx/react": "^17.0.1",
11
- "@nx/web": "17.0.1",
12
- "@phenomnomnominal/tsquery": "^5.0.1",
31
+ "@nx/devkit": "17.0.4",
32
+ "@nx/js": "17.0.4",
33
+ "@nx/react": "17.0.4",
13
34
  "tslib": "^2.3.1",
14
- "vite": "4.3.9",
15
- "@nrwl/remix": "17.0.0"
35
+ "@phenomnomnominal/tsquery": "~5.0.1",
36
+ "@nrwl/remix": "17.0.4"
16
37
  },
17
- "ng-update": {
18
- "requirements": {},
19
- "migrations": "./migrations.json"
38
+ "peerDependencies": {},
39
+ "publishConfig": {
40
+ "access": "public"
41
+ },
42
+ "exports": {
43
+ ".": "./index.js",
44
+ "./plugin": "./plugin.js",
45
+ "./plugins/component-testing": "./plugins/component-testing/index.js",
46
+ "./package.json": "./package.json",
47
+ "./executors.json": "./executors.json",
48
+ "./generators.json": "./generators.json",
49
+ "./migrations.json": "./migrations.json",
50
+ "./generators": "./generators.js"
20
51
  },
21
52
  "type": "commonjs"
22
- }
53
+ }
package/plugin.d.ts ADDED
@@ -0,0 +1 @@
1
+ export { createNodes, createDependencies, RemixPluginOptions, } from './src/plugins/plugin';
package/plugin.js ADDED
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createDependencies = exports.createNodes = void 0;
4
+ var plugin_1 = require("./src/plugins/plugin");
5
+ Object.defineProperty(exports, "createNodes", { enumerable: true, get: function () { return plugin_1.createNodes; } });
6
+ Object.defineProperty(exports, "createDependencies", { enumerable: true, get: function () { return plugin_1.createDependencies; } });