@nx/next 16.0.0-beta.1

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 (213) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/LICENSE +22 -0
  3. package/README.md +63 -0
  4. package/babel.d.ts +0 -0
  5. package/babel.js +13 -0
  6. package/babel.js.map +1 -0
  7. package/executors.json +36 -0
  8. package/generators.json +72 -0
  9. package/index.d.ts +8 -0
  10. package/index.js +20 -0
  11. package/index.js.map +1 -0
  12. package/migrations.json +312 -0
  13. package/package.json +64 -0
  14. package/plugins/with-less.d.ts +2 -0
  15. package/plugins/with-less.js +79 -0
  16. package/plugins/with-less.js.map +1 -0
  17. package/plugins/with-nx.d.ts +13 -0
  18. package/plugins/with-nx.js +278 -0
  19. package/plugins/with-nx.js.map +1 -0
  20. package/plugins/with-stylus.d.ts +2 -0
  21. package/plugins/with-stylus.js +79 -0
  22. package/plugins/with-stylus.js.map +1 -0
  23. package/src/executors/build/build.impl.d.ts +6 -0
  24. package/src/executors/build/build.impl.js +62 -0
  25. package/src/executors/build/build.impl.js.map +1 -0
  26. package/src/executors/build/compat.d.ts +2 -0
  27. package/src/executors/build/compat.js +6 -0
  28. package/src/executors/build/compat.js.map +1 -0
  29. package/src/executors/build/lib/check-project.d.ts +1 -0
  30. package/src/executors/build/lib/check-project.js +13 -0
  31. package/src/executors/build/lib/check-project.js.map +1 -0
  32. package/src/executors/build/lib/create-next-config-file.d.ts +3 -0
  33. package/src/executors/build/lib/create-next-config-file.js +15 -0
  34. package/src/executors/build/lib/create-next-config-file.js.map +1 -0
  35. package/src/executors/build/lib/update-package-json.d.ts +3 -0
  36. package/src/executors/build/lib/update-package-json.js +24 -0
  37. package/src/executors/build/lib/update-package-json.js.map +1 -0
  38. package/src/executors/build/schema.json +68 -0
  39. package/src/executors/export/compat.d.ts +2 -0
  40. package/src/executors/export/compat.js +6 -0
  41. package/src/executors/export/compat.js.map +1 -0
  42. package/src/executors/export/export.impl.d.ts +6 -0
  43. package/src/executors/export/export.impl.js +53 -0
  44. package/src/executors/export/export.impl.js.map +1 -0
  45. package/src/executors/export/schema.json +30 -0
  46. package/src/executors/server/compat.d.ts +2 -0
  47. package/src/executors/server/compat.js +6 -0
  48. package/src/executors/server/compat.js.map +1 -0
  49. package/src/executors/server/lib/default-server.d.ts +6 -0
  50. package/src/executors/server/lib/default-server.js +31 -0
  51. package/src/executors/server/lib/default-server.js.map +1 -0
  52. package/src/executors/server/lib/tsnode-register.d.ts +1 -0
  53. package/src/executors/server/lib/tsnode-register.js +23 -0
  54. package/src/executors/server/lib/tsnode-register.js.map +1 -0
  55. package/src/executors/server/schema.json +56 -0
  56. package/src/executors/server/server.impl.d.ts +7 -0
  57. package/src/executors/server/server.impl.js +114 -0
  58. package/src/executors/server/server.impl.js.map +1 -0
  59. package/src/generators/application/application.d.ts +4 -0
  60. package/src/generators/application/application.js +43 -0
  61. package/src/generators/application/application.js.map +1 -0
  62. package/src/generators/application/files/app/api/hello/route.ts__tmpl__ +4 -0
  63. package/src/generators/application/files/app/global.__stylesExt____tmpl__ +1 -0
  64. package/src/generators/application/files/app/layout.tsx__tmpl__ +22 -0
  65. package/src/generators/application/files/app/page.module.__style__ +1 -0
  66. package/src/generators/application/files/app/page.tsx__tmpl__ +28 -0
  67. package/src/generators/application/files/common/.babelrc__tmpl__ +21 -0
  68. package/src/generators/application/files/common/index.d.ts__tmpl__ +18 -0
  69. package/src/generators/application/files/common/next-env.d.ts__tmpl__ +5 -0
  70. package/src/generators/application/files/common/next.config.js__tmpl__ +112 -0
  71. package/src/generators/application/files/common/public/.gitkeep +0 -0
  72. package/src/generators/application/files/common/public/favicon.ico +0 -0
  73. package/src/generators/application/files/common/specs/__fileName__.spec.tsx__tmpl__ +11 -0
  74. package/src/generators/application/files/common/tsconfig.json__tmpl__ +18 -0
  75. package/src/generators/application/files/pages/__fileName__.module.__style__ +1 -0
  76. package/src/generators/application/files/pages/__fileName__.tsx__tmpl__ +28 -0
  77. package/src/generators/application/files/pages/_app.tsx__tmpl__ +18 -0
  78. package/src/generators/application/files/pages/_document.tsx__tmpl__ +33 -0
  79. package/src/generators/application/files/pages/styles.__stylesExt____tmpl__ +1 -0
  80. package/src/generators/application/lib/add-cypress.d.ts +3 -0
  81. package/src/generators/application/lib/add-cypress.js +18 -0
  82. package/src/generators/application/lib/add-cypress.js.map +1 -0
  83. package/src/generators/application/lib/add-jest.d.ts +3 -0
  84. package/src/generators/application/lib/add-jest.js +36 -0
  85. package/src/generators/application/lib/add-jest.js.map +1 -0
  86. package/src/generators/application/lib/add-linting.d.ts +3 -0
  87. package/src/generators/application/lib/add-linting.js +66 -0
  88. package/src/generators/application/lib/add-linting.js.map +1 -0
  89. package/src/generators/application/lib/add-project.d.ts +3 -0
  90. package/src/generators/application/lib/add-project.js +56 -0
  91. package/src/generators/application/lib/add-project.js.map +1 -0
  92. package/src/generators/application/lib/create-application-files.d.ts +3 -0
  93. package/src/generators/application/lib/create-application-files.helpers.d.ts +2 -0
  94. package/src/generators/application/lib/create-application-files.helpers.js +785 -0
  95. package/src/generators/application/lib/create-application-files.helpers.js.map +1 -0
  96. package/src/generators/application/lib/create-application-files.js +40 -0
  97. package/src/generators/application/lib/create-application-files.js.map +1 -0
  98. package/src/generators/application/lib/normalize-options.d.ts +13 -0
  99. package/src/generators/application/lib/normalize-options.js +35 -0
  100. package/src/generators/application/lib/normalize-options.js.map +1 -0
  101. package/src/generators/application/lib/set-defaults.d.ts +3 -0
  102. package/src/generators/application/lib/set-defaults.js +14 -0
  103. package/src/generators/application/lib/set-defaults.js.map +1 -0
  104. package/src/generators/application/lib/update-jest-config.d.ts +3 -0
  105. package/src/generators/application/lib/update-jest-config.js +16 -0
  106. package/src/generators/application/lib/update-jest-config.js.map +1 -0
  107. package/src/generators/application/schema.d.ts +19 -0
  108. package/src/generators/application/schema.json +131 -0
  109. package/src/generators/component/component.d.ts +15 -0
  110. package/src/generators/component/component.js +34 -0
  111. package/src/generators/component/component.js.map +1 -0
  112. package/src/generators/component/schema.json +119 -0
  113. package/src/generators/custom-server/custom-server.d.ts +4 -0
  114. package/src/generators/custom-server/custom-server.js +79 -0
  115. package/src/generators/custom-server/custom-server.js.map +1 -0
  116. package/src/generators/custom-server/files/server/main.ts__tmpl__ +46 -0
  117. package/src/generators/custom-server/files/tsconfig.server.json__tmpl__ +15 -0
  118. package/src/generators/custom-server/schema.d.ts +4 -0
  119. package/src/generators/custom-server/schema.json +30 -0
  120. package/src/generators/init/init.d.ts +5 -0
  121. package/src/generators/init/init.js +49 -0
  122. package/src/generators/init/init.js.map +1 -0
  123. package/src/generators/init/schema.d.ts +7 -0
  124. package/src/generators/init/schema.json +39 -0
  125. package/src/generators/library/lib/normalize-options.d.ts +7 -0
  126. package/src/generators/library/lib/normalize-options.js +17 -0
  127. package/src/generators/library/lib/normalize-options.js.map +1 -0
  128. package/src/generators/library/library.d.ts +5 -0
  129. package/src/generators/library/library.js +79 -0
  130. package/src/generators/library/library.js.map +1 -0
  131. package/src/generators/library/schema.d.ts +25 -0
  132. package/src/generators/library/schema.json +156 -0
  133. package/src/generators/page/page.d.ts +5 -0
  134. package/src/generators/page/page.js +27 -0
  135. package/src/generators/page/page.js.map +1 -0
  136. package/src/generators/page/schema.d.ts +13 -0
  137. package/src/generators/page/schema.json +107 -0
  138. package/src/migrations/update-12-10-0/fix-page-dir-for-eslint.d.ts +3 -0
  139. package/src/migrations/update-12-10-0/fix-page-dir-for-eslint.js +34 -0
  140. package/src/migrations/update-12-10-0/fix-page-dir-for-eslint.js.map +1 -0
  141. package/src/migrations/update-12-8-0/remove-styled-jsx-babel-plugin.d.ts +3 -0
  142. package/src/migrations/update-12-8-0/remove-styled-jsx-babel-plugin.js +26 -0
  143. package/src/migrations/update-12-8-0/remove-styled-jsx-babel-plugin.js.map +1 -0
  144. package/src/migrations/update-13-0-0/update-emotion-setup.d.ts +3 -0
  145. package/src/migrations/update-13-0-0/update-emotion-setup.js +39 -0
  146. package/src/migrations/update-13-0-0/update-emotion-setup.js.map +1 -0
  147. package/src/migrations/update-13-0-0/update-to-webpack-5.d.ts +3 -0
  148. package/src/migrations/update-13-0-0/update-to-webpack-5.js +32 -0
  149. package/src/migrations/update-13-0-0/update-to-webpack-5.js.map +1 -0
  150. package/src/migrations/update-13-0-3/fix-less.d.ts +3 -0
  151. package/src/migrations/update-13-0-3/fix-less.js +27 -0
  152. package/src/migrations/update-13-0-3/fix-less.js.map +1 -0
  153. package/src/migrations/update-13-1-1/enable-swc.d.ts +3 -0
  154. package/src/migrations/update-13-1-1/enable-swc.js +46 -0
  155. package/src/migrations/update-13-1-1/enable-swc.js.map +1 -0
  156. package/src/migrations/update-14-0-0/add-default-development-configurations.d.ts +3 -0
  157. package/src/migrations/update-14-0-0/add-default-development-configurations.js +36 -0
  158. package/src/migrations/update-14-0-0/add-default-development-configurations.js.map +1 -0
  159. package/src/migrations/update-14-4-3/add-dev-output-path.d.ts +3 -0
  160. package/src/migrations/update-14-4-3/add-dev-output-path.js +24 -0
  161. package/src/migrations/update-14-4-3/add-dev-output-path.js.map +1 -0
  162. package/src/migrations/update-14-5-3/add-gitignore-entry.d.ts +3 -0
  163. package/src/migrations/update-14-5-3/add-gitignore-entry.js +15 -0
  164. package/src/migrations/update-14-5-3/add-gitignore-entry.js.map +1 -0
  165. package/src/migrations/update-14-5-3/update-dev-output-path.d.ts +3 -0
  166. package/src/migrations/update-14-5-3/update-dev-output-path.js +29 -0
  167. package/src/migrations/update-14-5-3/update-dev-output-path.js.map +1 -0
  168. package/src/migrations/update-14-5-7/update-next-eslint.d.ts +3 -0
  169. package/src/migrations/update-14-5-7/update-next-eslint.js +32 -0
  170. package/src/migrations/update-14-5-7/update-next-eslint.js.map +1 -0
  171. package/src/migrations/update-15-8-8/add-style-packages.d.ts +3 -0
  172. package/src/migrations/update-15-8-8/add-style-packages.js +28 -0
  173. package/src/migrations/update-15-8-8/add-style-packages.js.map +1 -0
  174. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +2 -0
  175. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +13 -0
  176. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js.map +1 -0
  177. package/src/utils/add-gitignore-entry.d.ts +2 -0
  178. package/src/utils/add-gitignore-entry.js +18 -0
  179. package/src/utils/add-gitignore-entry.js.map +1 -0
  180. package/src/utils/config-invalid-function.fixture.d.ts +0 -0
  181. package/src/utils/config-invalid-function.fixture.js +2 -0
  182. package/src/utils/config-invalid-function.fixture.js.map +1 -0
  183. package/src/utils/config-not-a-function.fixture.d.ts +0 -0
  184. package/src/utils/config-not-a-function.fixture.js +2 -0
  185. package/src/utils/config-not-a-function.fixture.js.map +1 -0
  186. package/src/utils/config.d.ts +15 -0
  187. package/src/utils/config.fixture.d.ts +0 -0
  188. package/src/utils/config.fixture.js +4 -0
  189. package/src/utils/config.fixture.js.map +1 -0
  190. package/src/utils/config.js +87 -0
  191. package/src/utils/config.js.map +1 -0
  192. package/src/utils/constants.d.ts +1 -0
  193. package/src/utils/constants.js +5 -0
  194. package/src/utils/constants.js.map +1 -0
  195. package/src/utils/create-copy-plugin.d.ts +2 -0
  196. package/src/utils/create-copy-plugin.js +63 -0
  197. package/src/utils/create-copy-plugin.js.map +1 -0
  198. package/src/utils/generate-globs.d.ts +5 -0
  199. package/src/utils/generate-globs.js +30 -0
  200. package/src/utils/generate-globs.js.map +1 -0
  201. package/src/utils/styles.d.ts +40 -0
  202. package/src/utils/styles.js +56 -0
  203. package/src/utils/styles.js.map +1 -0
  204. package/src/utils/types.d.ts +53 -0
  205. package/src/utils/types.js +3 -0
  206. package/src/utils/types.js.map +1 -0
  207. package/src/utils/versions.d.ts +9 -0
  208. package/src/utils/versions.js +13 -0
  209. package/src/utils/versions.js.map +1 -0
  210. package/tailwind.d.ts +2 -0
  211. package/tailwind.js +7 -0
  212. package/tailwind.js.map +1 -0
  213. package/typings/image.d.ts +12 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+
7
+
8
+ **Note:** Version bump only for package @nx/next
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ (The MIT License)
2
+
3
+ Copyright (c) 2017-2023 Narwhal Technologies Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ 'Software'), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,63 @@
1
+ <p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx.png" width="600" alt="Nx - Smart, Fast and Extensible Build System"></p>
2
+
3
+ <div style="text-align: center;">
4
+
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/@nrwl/workspace.svg?style=flat-square)]()
7
+ [![NPM Version](https://badge.fury.io/js/%40nrwl%2Fworkspace.svg)](https://www.npmjs.com/@nrwl/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 @nrwl/community on slack](https://img.shields.io/badge/slack-%40nrwl%2Fcommunity-brightgreen)](https://join.slack.com/t/nrwlcommunity/shared_invite/enQtNzU5MTE4OTQwOTk0LTgxY2E0ZWYzMWE0YzA5ZDA2MWM1NDVhNmI2ZWMyYmZhNWJiODk3MjkxZjY3MzU5ZjRmM2NmNWU1OTgyZmE4Mzc)
12
+
13
+ </div>
14
+
15
+
16
+ <hr>
17
+
18
+ # Nx: Smart, Fast and Extensible Build System
19
+
20
+ Nx is a next generation build system with first class monorepo support and powerful integrations.
21
+
22
+ This package is a [Next.js plugin for Nx](https://nx.dev/next/overview).
23
+
24
+ ## Getting Started
25
+
26
+ ### Creating an Nx Workspace
27
+
28
+ **Using `npx`**
29
+
30
+ ```bash
31
+ npx create-nx-workspace
32
+ ```
33
+
34
+ **Using `npm init`**
35
+
36
+ ```bash
37
+ npm init nx-workspace
38
+ ```
39
+
40
+ **Using `yarn create`**
41
+
42
+ ```bash
43
+ yarn create nx-workspace
44
+ ```
45
+
46
+ ### Adding Nx to an Existing Repository
47
+
48
+ Run:
49
+
50
+ ```bash
51
+ npx nx@latest init
52
+ ```
53
+
54
+ ## Documentation & Resources
55
+
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)
60
+
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, Fast and Extensible Build System"></a></p>
63
+
package/babel.d.ts ADDED
File without changes
package/babel.js ADDED
@@ -0,0 +1,13 @@
1
+ /*
2
+ * Babel preset to provide Next.js support for Nx.
3
+ */
4
+ module.exports = function (api, options) {
5
+ api.assertVersion(7);
6
+ return {
7
+ presets: [['next/babel', options]],
8
+ plugins: [
9
+ [require.resolve('@babel/plugin-proposal-decorators'), { legacy: true }],
10
+ ],
11
+ };
12
+ };
13
+ //# sourceMappingURL=babel.js.map
package/babel.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"babel.js","sourceRoot":"","sources":["../../../packages/next/babel.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,OAAO,GAAG,UAAU,GAAG,EAAE,OAAO;IACrC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IACrB,OAAO;QACL,OAAO,EAAE,CAAC,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QAClC,OAAO,EAAE;YACP,CAAC,OAAO,CAAC,OAAO,CAAC,mCAAmC,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;SACzE;KACF,CAAC;AACJ,CAAC,CAAC"}
package/executors.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "executors": {
3
+ "build": {
4
+ "implementation": "./src/executors/build/build.impl",
5
+ "schema": "./src/executors/build/schema.json",
6
+ "description": "Build a Next.js application."
7
+ },
8
+ "server": {
9
+ "implementation": "./src/executors/server/server.impl",
10
+ "schema": "./src/executors/server/schema.json",
11
+ "description": "Serve a Next.js application."
12
+ },
13
+ "export": {
14
+ "implementation": "./src/executors/export/export.impl",
15
+ "schema": "./src/executors/export/schema.json",
16
+ "description": "Export a Next.js application. The exported application is located at `dist/$outputPath/exported`."
17
+ }
18
+ },
19
+ "builders": {
20
+ "build": {
21
+ "implementation": "./src/executors/build/compat",
22
+ "schema": "./src/executors/build/schema.json",
23
+ "description": "Build a Next.js application."
24
+ },
25
+ "server": {
26
+ "implementation": "./src/executors/server/compat",
27
+ "schema": "./src/executors/server/schema.json",
28
+ "description": "Serve a Next.js application."
29
+ },
30
+ "export": {
31
+ "implementation": "./src/executors/export/compat",
32
+ "schema": "./src/executors/export/schema.json",
33
+ "description": "Export a Next.js application. The exported application is located at `dist/$outputPath/exported`."
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,72 @@
1
+ {
2
+ "name": "nx/next",
3
+ "version": "0.1",
4
+ "extends": ["@nrwl/react"],
5
+ "schematics": {
6
+ "init": {
7
+ "factory": "./src/generators/init/init#nextInitSchematic",
8
+ "schema": "./src/generators/init/schema.json",
9
+ "description": "Initialize the `@nrwl/next` plugin.",
10
+ "hidden": true
11
+ },
12
+ "application": {
13
+ "factory": "./src/generators/application/application#applicationSchematic",
14
+ "schema": "./src/generators/application/schema.json",
15
+ "aliases": ["app"],
16
+ "x-type": "application",
17
+ "description": "Create a Next.js application."
18
+ },
19
+ "page": {
20
+ "factory": "./src/generators/page/page#pageSchematic",
21
+ "schema": "./src/generators/page/schema.json",
22
+ "description": "Create a Next.js page component."
23
+ },
24
+ "component": {
25
+ "factory": "./src/generators/component/component#componentSchematic",
26
+ "schema": "./src/generators/component/schema.json",
27
+ "description": "Create a React component."
28
+ },
29
+ "custom-server": {
30
+ "factory": "./src/generators/custom-server/custom-server#customServerSchematic",
31
+ "schema": "./src/generators/custom-server/schema.json",
32
+ "description": "Set up a custom server."
33
+ }
34
+ },
35
+ "generators": {
36
+ "init": {
37
+ "factory": "./src/generators/init/init#nextInitGenerator",
38
+ "schema": "./src/generators/init/schema.json",
39
+ "description": "Initialize the `@nrwl/next` plugin.",
40
+ "hidden": true
41
+ },
42
+ "application": {
43
+ "factory": "./src/generators/application/application#applicationGenerator",
44
+ "schema": "./src/generators/application/schema.json",
45
+ "aliases": ["app"],
46
+ "x-type": "application",
47
+ "description": "Create an application."
48
+ },
49
+ "page": {
50
+ "factory": "./src/generators/page/page#pageGenerator",
51
+ "schema": "./src/generators/page/schema.json",
52
+ "description": "Create a page."
53
+ },
54
+ "component": {
55
+ "factory": "./src/generators/component/component#componentGenerator",
56
+ "schema": "./src/generators/component/schema.json",
57
+ "description": "Create a component."
58
+ },
59
+ "library": {
60
+ "factory": "./src/generators/library/library#libraryGenerator",
61
+ "schema": "./src/generators/library/schema.json",
62
+ "aliases": ["lib"],
63
+ "x-type": "library",
64
+ "description": "Create a library."
65
+ },
66
+ "custom-server": {
67
+ "factory": "./src/generators/custom-server/custom-server#customServerGenerator",
68
+ "schema": "./src/generators/custom-server/schema.json",
69
+ "description": "Set up a custom server."
70
+ }
71
+ }
72
+ }
package/index.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ export * from './src/utils/types';
2
+ export { createGlobPatternsOfDependentProjects } from './src/utils/generate-globs';
3
+ export { applicationGenerator } from './src/generators/application/application';
4
+ export { componentGenerator } from './src/generators/component/component';
5
+ export { libraryGenerator } from './src/generators/library/library';
6
+ export { pageGenerator } from './src/generators/page/page';
7
+ export { withNx } from './plugins/with-nx';
8
+ export { composePlugins } from './src/utils/config';
package/index.js ADDED
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.composePlugins = exports.withNx = exports.pageGenerator = exports.libraryGenerator = exports.componentGenerator = exports.applicationGenerator = exports.createGlobPatternsOfDependentProjects = void 0;
4
+ const tslib_1 = require("tslib");
5
+ tslib_1.__exportStar(require("./src/utils/types"), exports);
6
+ var generate_globs_1 = require("./src/utils/generate-globs");
7
+ Object.defineProperty(exports, "createGlobPatternsOfDependentProjects", { enumerable: true, get: function () { return generate_globs_1.createGlobPatternsOfDependentProjects; } });
8
+ var application_1 = require("./src/generators/application/application");
9
+ Object.defineProperty(exports, "applicationGenerator", { enumerable: true, get: function () { return application_1.applicationGenerator; } });
10
+ var component_1 = require("./src/generators/component/component");
11
+ Object.defineProperty(exports, "componentGenerator", { enumerable: true, get: function () { return component_1.componentGenerator; } });
12
+ var library_1 = require("./src/generators/library/library");
13
+ Object.defineProperty(exports, "libraryGenerator", { enumerable: true, get: function () { return library_1.libraryGenerator; } });
14
+ var page_1 = require("./src/generators/page/page");
15
+ Object.defineProperty(exports, "pageGenerator", { enumerable: true, get: function () { return page_1.pageGenerator; } });
16
+ var with_nx_1 = require("./plugins/with-nx");
17
+ Object.defineProperty(exports, "withNx", { enumerable: true, get: function () { return with_nx_1.withNx; } });
18
+ var config_1 = require("./src/utils/config");
19
+ Object.defineProperty(exports, "composePlugins", { enumerable: true, get: function () { return config_1.composePlugins; } });
20
+ //# sourceMappingURL=index.js.map
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/next/index.ts"],"names":[],"mappings":";;;;AAAA,4DAAkC;AAClC,6DAAmF;AAA1E,uIAAA,qCAAqC,OAAA;AAE9C,wEAAgF;AAAvE,mHAAA,oBAAoB,OAAA;AAC7B,kEAA0E;AAAjE,+GAAA,kBAAkB,OAAA;AAC3B,4DAAoE;AAA3D,2GAAA,gBAAgB,OAAA;AACzB,mDAA2D;AAAlD,qGAAA,aAAa,OAAA;AACtB,6CAA2C;AAAlC,iGAAA,MAAM,OAAA;AACf,6CAAoD;AAA3C,wGAAA,cAAc,OAAA"}
@@ -0,0 +1,312 @@
1
+ {
2
+ "generators": {
3
+ "fix-nextjs-lib-babel-config-12.8.0": {
4
+ "cli": "nx",
5
+ "version": "12.8.0-beta.11",
6
+ "description": "Adjust the Next.js lib babel configuration for styled-jsx",
7
+ "factory": "./src/migrations/update-12-8-0/remove-styled-jsx-babel-plugin"
8
+ },
9
+ "fix-page-dir-for-eslint": {
10
+ "cli": "nx",
11
+ "version": "12.10.0-beta.1",
12
+ "description": "Updates .eslintrc.json file to use the correct pages directory for '@next/next/no-html-link-for-pages'.",
13
+ "factory": "./src/migrations/update-12-10-0/fix-page-dir-for-eslint"
14
+ },
15
+ "update-emotion-setup-13.0.0": {
16
+ "cli": "nx",
17
+ "version": "13.0.0-beta.0",
18
+ "description": "Update tsconfig.json to use `jsxImportSource` to support css prop",
19
+ "factory": "./src/migrations/update-13-0-0/update-emotion-setup"
20
+ },
21
+ "update-to-webpack-5": {
22
+ "cli": "nx",
23
+ "version": "13.0.0-beta.1",
24
+ "description": "Set `webpack5: true` for all next.js projects.",
25
+ "factory": "./src/migrations/update-13-0-0/update-to-webpack-5"
26
+ },
27
+ "fix-less": {
28
+ "cli": "nx",
29
+ "version": "13.0.3-beta.1",
30
+ "description": "Fix setup for less stylesheets",
31
+ "factory": "./src/migrations/update-13-0-3/fix-less"
32
+ },
33
+ "add-default-development-configurations-14.0.0": {
34
+ "cli": "nx",
35
+ "version": "14.0.0-beta.0",
36
+ "description": "Add a default development configuration for build and serve targets.",
37
+ "factory": "./src/migrations/update-14-0-0/add-default-development-configurations"
38
+ },
39
+ "add-dev-output-path": {
40
+ "cli": "nx",
41
+ "version": "14.4.3-beta.0",
42
+ "description": "Add a development outputPath to avoid conflict with the production build.",
43
+ "factory": "./src/migrations/update-14-4-3/add-dev-output-path"
44
+ },
45
+ "add-gitignore-entry": {
46
+ "cli": "nx",
47
+ "version": "14.5.3-beta.0",
48
+ "description": "Add .next folder to gitignore.",
49
+ "factory": "./src/migrations/update-14-5-3/add-gitignore-entry"
50
+ },
51
+ "update-dev-output-path": {
52
+ "cli": "nx",
53
+ "version": "14.5.3-beta.0",
54
+ "description": "Update development outputPath to the project root.",
55
+ "factory": "./src/migrations/update-14-5-3/update-dev-output-path"
56
+ },
57
+ "add-style-packages": {
58
+ "cli": "nx",
59
+ "version": "15.8.8-beta.0",
60
+ "description": "Add less and stylus packages if used.",
61
+ "factory": "./src/migrations/update-15-8-8/add-style-packages"
62
+ },
63
+ "update-16-0-0-add-nx-packages": {
64
+ "cli": "nx",
65
+ "version": "16.0.0-beta.1",
66
+ "description": "Replace @nrwl/next with @nx/next",
67
+ "implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages"
68
+ }
69
+ },
70
+ "packageJsonUpdates": {
71
+ "12.1.2": {
72
+ "version": "12.1.2-beta.0",
73
+ "packages": {
74
+ "next": {
75
+ "version": "10.2.0",
76
+ "alwaysAddToPackageJson": false
77
+ }
78
+ }
79
+ },
80
+ "12.6.0": {
81
+ "version": "12.6.0-beta.0",
82
+ "packages": {
83
+ "next": {
84
+ "version": "11.0.1",
85
+ "alwaysAddToPackageJson": false
86
+ },
87
+ "eslint-config-next": {
88
+ "version": "11.0.1",
89
+ "addToPackageJson": "devDependencies"
90
+ }
91
+ }
92
+ },
93
+ "update-12.7.2": {
94
+ "version": "12.7.2-beta.0",
95
+ "packages": {
96
+ "next": {
97
+ "version": "11.1.0",
98
+ "alwaysAddToPackageJson": false
99
+ },
100
+ "eslint-config-next": {
101
+ "version": "11.1.0",
102
+ "alwaysAddToPackageJson": false
103
+ }
104
+ }
105
+ },
106
+ "update-13.0.3": {
107
+ "version": "13.0.3-beta.0",
108
+ "packages": {
109
+ "next": {
110
+ "version": "12.0.0",
111
+ "alwaysAddToPackageJson": false
112
+ },
113
+ "eslint-config-next": {
114
+ "version": "12.0.0",
115
+ "alwaysAddToPackageJson": false
116
+ }
117
+ }
118
+ },
119
+ "13.3.0": {
120
+ "version": "13.3.0-beta.0",
121
+ "packages": {
122
+ "next": {
123
+ "version": "12.0.7",
124
+ "alwaysAddToPackageJson": false
125
+ },
126
+ "eslint-config-next": {
127
+ "version": "12.0.7",
128
+ "alwaysAddToPackageJson": false
129
+ }
130
+ }
131
+ },
132
+ "13.9.0": {
133
+ "version": "13.9.0-beta.0",
134
+ "packages": {
135
+ "next": {
136
+ "version": "12.1.0",
137
+ "alwaysAddToPackageJson": false
138
+ },
139
+ "eslint-config-next": {
140
+ "version": "12.1.0",
141
+ "alwaysAddToPackageJson": false
142
+ }
143
+ }
144
+ },
145
+ "13.10.0": {
146
+ "version": "13.10.0-beta.1",
147
+ "packages": {
148
+ "next": {
149
+ "version": "12.1.2",
150
+ "alwaysAddToPackageJson": false
151
+ },
152
+ "eslint-config-next": {
153
+ "version": "12.1.2",
154
+ "alwaysAddToPackageJson": false
155
+ },
156
+ "sass": {
157
+ "version": "1.49.9",
158
+ "alwaysAddToPackageJson": false
159
+ }
160
+ }
161
+ },
162
+ "14.0.0": {
163
+ "version": "14.0.0-beta.1",
164
+ "packages": {
165
+ "next": {
166
+ "version": "12.1.5",
167
+ "alwaysAddToPackageJson": false
168
+ },
169
+ "eslint-config-next": {
170
+ "version": "12.1.5",
171
+ "alwaysAddToPackageJson": false
172
+ }
173
+ }
174
+ },
175
+ "14.2.3": {
176
+ "version": "14.2.3-beta.0",
177
+ "packages": {
178
+ "next": {
179
+ "version": "12.1.6",
180
+ "alwaysAddToPackageJson": false
181
+ },
182
+ "eslint-config-next": {
183
+ "version": "12.1.6",
184
+ "alwaysAddToPackageJson": false
185
+ },
186
+ "sass": {
187
+ "version": "1.52.3",
188
+ "alwaysAddToPackageJson": false
189
+ },
190
+ "less-loader": {
191
+ "version": "11.0.0",
192
+ "alwaysAddToPackageJson": false
193
+ },
194
+ "stylus-loader": {
195
+ "version": "7.0.0",
196
+ "alwaysAddToPackageJson": false
197
+ }
198
+ }
199
+ },
200
+ "14.4.3": {
201
+ "version": "14.4.3",
202
+ "packages": {
203
+ "next": {
204
+ "version": "12.2.2",
205
+ "alwaysAddToPackageJson": false
206
+ },
207
+ "eslint-config-next": {
208
+ "version": "12.2.2",
209
+ "alwaysAddToPackageJson": false
210
+ },
211
+ "sass": {
212
+ "version": "1.53.0",
213
+ "alwaysAddToPackageJson": false
214
+ }
215
+ }
216
+ },
217
+ "14.5.0": {
218
+ "version": "14.5.0-beta.0",
219
+ "packages": {
220
+ "next": {
221
+ "version": "12.2.3",
222
+ "alwaysAddToPackageJson": false
223
+ },
224
+ "eslint-config-next": {
225
+ "version": "12.2.3",
226
+ "alwaysAddToPackageJson": false
227
+ },
228
+ "sass": {
229
+ "version": "1.54.0",
230
+ "alwaysAddToPackageJson": false
231
+ }
232
+ }
233
+ },
234
+ "14.5.3": {
235
+ "version": "14.5.3-beta.0",
236
+ "packages": {
237
+ "@emotion/server": {
238
+ "version": "11.10.0",
239
+ "alwaysAddToPackageJson": false
240
+ }
241
+ }
242
+ },
243
+ "14.6.0": {
244
+ "version": "14.6.0-beta.1",
245
+ "packages": {
246
+ "next": {
247
+ "version": "12.2.5",
248
+ "alwaysAddToPackageJson": false
249
+ },
250
+ "eslint-config-next": {
251
+ "version": "12.2.5",
252
+ "alwaysAddToPackageJson": false
253
+ },
254
+ "sass": {
255
+ "version": "1.54.5",
256
+ "alwaysAddToPackageJson": false
257
+ }
258
+ }
259
+ },
260
+ "14.7.10": {
261
+ "version": "14.7.10-beta.1",
262
+ "packages": {
263
+ "next": {
264
+ "version": "12.3.1",
265
+ "alwaysAddToPackageJson": false
266
+ },
267
+ "eslint-config-next": {
268
+ "version": "12.3.1",
269
+ "alwaysAddToPackageJson": false
270
+ },
271
+ "sass": {
272
+ "version": "1.55.0",
273
+ "alwaysAddToPackageJson": false
274
+ }
275
+ }
276
+ },
277
+ "15.0.4": {
278
+ "version": "15.0.4-beta.0",
279
+ "packages": {
280
+ "next": {
281
+ "version": "13.0.0",
282
+ "alwaysAddToPackageJson": false
283
+ },
284
+ "eslint-config-next": {
285
+ "version": "13.0.0",
286
+ "alwaysAddToPackageJson": false
287
+ },
288
+ "less-loader": {
289
+ "version": "11.1.0",
290
+ "alwaysAddToPackageJson": false
291
+ },
292
+ "stylus-loader": {
293
+ "version": "7.1.0",
294
+ "alwaysAddToPackageJson": false
295
+ }
296
+ }
297
+ },
298
+ "15.4.5": {
299
+ "version": "15.4.5-beta.0",
300
+ "packages": {
301
+ "next": {
302
+ "version": "13.1.1",
303
+ "alwaysAddToPackageJson": false
304
+ },
305
+ "eslint-config-next": {
306
+ "version": "13.1.1",
307
+ "alwaysAddToPackageJson": false
308
+ }
309
+ }
310
+ }
311
+ }
312
+ }
package/package.json ADDED
@@ -0,0 +1,64 @@
1
+ {
2
+ "name": "@nx/next",
3
+ "version": "16.0.0-beta.1",
4
+ "private": false,
5
+ "description": "The Next.js plugin for Nx contains executors and generators for managing Next.js applications and libraries within an Nx workspace. It provides:\n\n\n- Scaffolding for creating, building, serving, linting, and testing Next.js applications.\n\n- Integration with building, serving, and exporting a Next.js application.\n\n- Integration with React libraries within the workspace. \n\nWhen using Next.js in Nx, you get the out-of-the-box support for TypeScript, Cypress, and Jest. No need to configure anything: watch mode, source maps, and typings just work.",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/nrwl/nx.git",
9
+ "directory": "packages/next"
10
+ },
11
+ "keywords": [
12
+ "Monorepo",
13
+ "Node",
14
+ "Next",
15
+ "Jest",
16
+ "Cypress",
17
+ "CLI"
18
+ ],
19
+ "main": "./index",
20
+ "typings": "./index.d.ts",
21
+ "author": "Victor Savkin",
22
+ "license": "MIT",
23
+ "bugs": {
24
+ "url": "https://github.com/nrwl/nx/issues"
25
+ },
26
+ "homepage": "https://nx.dev",
27
+ "schematics": "./generators.json",
28
+ "builders": "./executors.json",
29
+ "ng-update": {
30
+ "requirements": {},
31
+ "migrations": "./migrations.json"
32
+ },
33
+ "peerDependencies": {
34
+ "next": "^13.0.0"
35
+ },
36
+ "dependencies": {
37
+ "@babel/plugin-proposal-decorators": "^7.14.5",
38
+ "@nrwl/next": "16.0.0-beta.1",
39
+ "@nx/devkit": "16.0.0-beta.1",
40
+ "@nx/js": "16.0.0-beta.1",
41
+ "@nx/linter": "16.0.0-beta.1",
42
+ "@nx/react": "16.0.0-beta.1",
43
+ "@nx/workspace": "16.0.0-beta.1",
44
+ "@svgr/webpack": "^6.1.2",
45
+ "chalk": "^4.1.0",
46
+ "copy-webpack-plugin": "^10.2.4",
47
+ "dotenv": "~10.0.0",
48
+ "express": "^4.18.1",
49
+ "fs-extra": "^11.1.0",
50
+ "http-proxy-middleware": "^2.0.6",
51
+ "ignore": "^5.0.4",
52
+ "semver": "7.3.4",
53
+ "ts-node": "10.9.1",
54
+ "tsconfig-paths": "^4.1.2",
55
+ "tsconfig-paths-webpack-plugin": "4.0.0",
56
+ "url-loader": "^4.1.1",
57
+ "webpack-merge": "^5.8.0"
58
+ },
59
+ "publishConfig": {
60
+ "access": "public"
61
+ },
62
+ "types": "./index.d.ts",
63
+ "gitHead": "abf534c265f5aa3aac146e55bb31de598ea281d7"
64
+ }
@@ -0,0 +1,2 @@
1
+ import { NextConfigFn } from '../src/utils/config';
2
+ export declare function withLess(configFn: NextConfigFn): NextConfigFn;