@nrwl/next 15.9.2 → 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 (203) hide show
  1. package/babel.js +1 -12
  2. package/babel.js.map +1 -1
  3. package/executors.json +12 -12
  4. package/generators.json +2 -70
  5. package/index.d.ts +1 -6
  6. package/index.js +1 -12
  7. package/index.js.map +1 -1
  8. package/package.json +7 -30
  9. package/plugins/with-less.d.ts +1 -2
  10. package/plugins/with-less.js +1 -75
  11. package/plugins/with-less.js.map +1 -1
  12. package/plugins/with-nx.d.ts +1 -15
  13. package/plugins/with-nx.js +1 -274
  14. package/plugins/with-nx.js.map +1 -1
  15. package/plugins/with-stylus.d.ts +1 -2
  16. package/plugins/with-stylus.js +1 -75
  17. package/plugins/with-stylus.js.map +1 -1
  18. package/tailwind.d.ts +1 -2
  19. package/tailwind.js +2 -4
  20. package/tailwind.js.map +1 -1
  21. package/README.md +0 -63
  22. package/migrations.json +0 -306
  23. package/src/executors/build/build.impl.d.ts +0 -6
  24. package/src/executors/build/build.impl.js +0 -62
  25. package/src/executors/build/build.impl.js.map +0 -1
  26. package/src/executors/build/compat.d.ts +0 -2
  27. package/src/executors/build/compat.js +0 -6
  28. package/src/executors/build/compat.js.map +0 -1
  29. package/src/executors/build/lib/check-project.d.ts +0 -1
  30. package/src/executors/build/lib/check-project.js +0 -13
  31. package/src/executors/build/lib/check-project.js.map +0 -1
  32. package/src/executors/build/lib/create-next-config-file.d.ts +0 -3
  33. package/src/executors/build/lib/create-next-config-file.js +0 -15
  34. package/src/executors/build/lib/create-next-config-file.js.map +0 -1
  35. package/src/executors/build/lib/update-package-json.d.ts +0 -3
  36. package/src/executors/build/lib/update-package-json.js +0 -24
  37. package/src/executors/build/lib/update-package-json.js.map +0 -1
  38. package/src/executors/build/schema.json +0 -68
  39. package/src/executors/export/compat.d.ts +0 -2
  40. package/src/executors/export/compat.js +0 -6
  41. package/src/executors/export/compat.js.map +0 -1
  42. package/src/executors/export/export.impl.d.ts +0 -6
  43. package/src/executors/export/export.impl.js +0 -53
  44. package/src/executors/export/export.impl.js.map +0 -1
  45. package/src/executors/export/schema.json +0 -30
  46. package/src/executors/server/compat.d.ts +0 -2
  47. package/src/executors/server/compat.js +0 -6
  48. package/src/executors/server/compat.js.map +0 -1
  49. package/src/executors/server/lib/custom-server.d.ts +0 -2
  50. package/src/executors/server/lib/custom-server.js +0 -15
  51. package/src/executors/server/lib/custom-server.js.map +0 -1
  52. package/src/executors/server/lib/default-server.d.ts +0 -6
  53. package/src/executors/server/lib/default-server.js +0 -34
  54. package/src/executors/server/lib/default-server.js.map +0 -1
  55. package/src/executors/server/lib/tsnode-register.d.ts +0 -1
  56. package/src/executors/server/lib/tsnode-register.js +0 -23
  57. package/src/executors/server/lib/tsnode-register.js.map +0 -1
  58. package/src/executors/server/schema.json +0 -61
  59. package/src/executors/server/server.impl.d.ts +0 -7
  60. package/src/executors/server/server.impl.js +0 -120
  61. package/src/executors/server/server.impl.js.map +0 -1
  62. package/src/generators/application/application.d.ts +0 -4
  63. package/src/generators/application/application.js +0 -45
  64. package/src/generators/application/application.js.map +0 -1
  65. package/src/generators/application/files/.babelrc__tmpl__ +0 -21
  66. package/src/generators/application/files/index.d.ts__tmpl__ +0 -18
  67. package/src/generators/application/files/next-env.d.ts__tmpl__ +0 -5
  68. package/src/generators/application/files/next.config.js__tmpl__ +0 -70
  69. package/src/generators/application/files/pages/__fileName__.module.__style__ +0 -1
  70. package/src/generators/application/files/pages/__fileName__.tsx__tmpl__ +0 -28
  71. package/src/generators/application/files/pages/_app.tsx__tmpl__ +0 -18
  72. package/src/generators/application/files/pages/_document.tsx__tmpl__ +0 -33
  73. package/src/generators/application/files/pages/styles.__stylesExt____tmpl__ +0 -1
  74. package/src/generators/application/files/public/.gitkeep +0 -0
  75. package/src/generators/application/files/specs/__fileName__.spec.tsx__tmpl__ +0 -11
  76. package/src/generators/application/files/tsconfig.json__tmpl__ +0 -18
  77. package/src/generators/application/lib/add-cypress.d.ts +0 -3
  78. package/src/generators/application/lib/add-cypress.js +0 -18
  79. package/src/generators/application/lib/add-cypress.js.map +0 -1
  80. package/src/generators/application/lib/add-jest.d.ts +0 -3
  81. package/src/generators/application/lib/add-jest.js +0 -36
  82. package/src/generators/application/lib/add-jest.js.map +0 -1
  83. package/src/generators/application/lib/add-linting.d.ts +0 -3
  84. package/src/generators/application/lib/add-linting.js +0 -66
  85. package/src/generators/application/lib/add-linting.js.map +0 -1
  86. package/src/generators/application/lib/add-project.d.ts +0 -3
  87. package/src/generators/application/lib/add-project.js +0 -59
  88. package/src/generators/application/lib/add-project.js.map +0 -1
  89. package/src/generators/application/lib/create-application-files.d.ts +0 -3
  90. package/src/generators/application/lib/create-application-files.helpers.d.ts +0 -2
  91. package/src/generators/application/lib/create-application-files.helpers.js +0 -785
  92. package/src/generators/application/lib/create-application-files.helpers.js.map +0 -1
  93. package/src/generators/application/lib/create-application-files.js +0 -34
  94. package/src/generators/application/lib/create-application-files.js.map +0 -1
  95. package/src/generators/application/lib/create-next-server-files.d.ts +0 -3
  96. package/src/generators/application/lib/create-next-server-files.js +0 -57
  97. package/src/generators/application/lib/create-next-server-files.js.map +0 -1
  98. package/src/generators/application/lib/normalize-options.d.ts +0 -13
  99. package/src/generators/application/lib/normalize-options.js +0 -33
  100. package/src/generators/application/lib/normalize-options.js.map +0 -1
  101. package/src/generators/application/lib/set-defaults.d.ts +0 -3
  102. package/src/generators/application/lib/set-defaults.js +0 -14
  103. package/src/generators/application/lib/set-defaults.js.map +0 -1
  104. package/src/generators/application/lib/update-jest-config.d.ts +0 -3
  105. package/src/generators/application/lib/update-jest-config.js +0 -16
  106. package/src/generators/application/lib/update-jest-config.js.map +0 -1
  107. package/src/generators/application/schema.d.ts +0 -20
  108. package/src/generators/application/schema.json +0 -131
  109. package/src/generators/component/component.d.ts +0 -15
  110. package/src/generators/component/component.js +0 -34
  111. package/src/generators/component/component.js.map +0 -1
  112. package/src/generators/component/schema.json +0 -119
  113. package/src/generators/custom-server/custom-server.d.ts +0 -4
  114. package/src/generators/custom-server/custom-server.js +0 -79
  115. package/src/generators/custom-server/custom-server.js.map +0 -1
  116. package/src/generators/custom-server/files/server/main.ts__tmpl__ +0 -46
  117. package/src/generators/custom-server/files/tsconfig.server.json__tmpl__ +0 -15
  118. package/src/generators/custom-server/schema.d.ts +0 -4
  119. package/src/generators/custom-server/schema.json +0 -30
  120. package/src/generators/init/init.d.ts +0 -5
  121. package/src/generators/init/init.js +0 -49
  122. package/src/generators/init/init.js.map +0 -1
  123. package/src/generators/init/schema.d.ts +0 -7
  124. package/src/generators/init/schema.json +0 -39
  125. package/src/generators/library/library.d.ts +0 -5
  126. package/src/generators/library/library.js +0 -73
  127. package/src/generators/library/library.js.map +0 -1
  128. package/src/generators/library/schema.d.ts +0 -26
  129. package/src/generators/library/schema.json +0 -162
  130. package/src/generators/page/page.d.ts +0 -5
  131. package/src/generators/page/page.js +0 -27
  132. package/src/generators/page/page.js.map +0 -1
  133. package/src/generators/page/schema.d.ts +0 -13
  134. package/src/generators/page/schema.json +0 -107
  135. package/src/migrations/update-12-10-0/fix-page-dir-for-eslint.d.ts +0 -3
  136. package/src/migrations/update-12-10-0/fix-page-dir-for-eslint.js +0 -34
  137. package/src/migrations/update-12-10-0/fix-page-dir-for-eslint.js.map +0 -1
  138. package/src/migrations/update-12-8-0/remove-styled-jsx-babel-plugin.d.ts +0 -3
  139. package/src/migrations/update-12-8-0/remove-styled-jsx-babel-plugin.js +0 -26
  140. package/src/migrations/update-12-8-0/remove-styled-jsx-babel-plugin.js.map +0 -1
  141. package/src/migrations/update-13-0-0/update-emotion-setup.d.ts +0 -3
  142. package/src/migrations/update-13-0-0/update-emotion-setup.js +0 -39
  143. package/src/migrations/update-13-0-0/update-emotion-setup.js.map +0 -1
  144. package/src/migrations/update-13-0-0/update-to-webpack-5.d.ts +0 -3
  145. package/src/migrations/update-13-0-0/update-to-webpack-5.js +0 -32
  146. package/src/migrations/update-13-0-0/update-to-webpack-5.js.map +0 -1
  147. package/src/migrations/update-13-0-3/fix-less.d.ts +0 -3
  148. package/src/migrations/update-13-0-3/fix-less.js +0 -27
  149. package/src/migrations/update-13-0-3/fix-less.js.map +0 -1
  150. package/src/migrations/update-13-1-1/enable-swc.d.ts +0 -3
  151. package/src/migrations/update-13-1-1/enable-swc.js +0 -46
  152. package/src/migrations/update-13-1-1/enable-swc.js.map +0 -1
  153. package/src/migrations/update-14-0-0/add-default-development-configurations.d.ts +0 -3
  154. package/src/migrations/update-14-0-0/add-default-development-configurations.js +0 -36
  155. package/src/migrations/update-14-0-0/add-default-development-configurations.js.map +0 -1
  156. package/src/migrations/update-14-4-3/add-dev-output-path.d.ts +0 -3
  157. package/src/migrations/update-14-4-3/add-dev-output-path.js +0 -24
  158. package/src/migrations/update-14-4-3/add-dev-output-path.js.map +0 -1
  159. package/src/migrations/update-14-5-3/add-gitignore-entry.d.ts +0 -3
  160. package/src/migrations/update-14-5-3/add-gitignore-entry.js +0 -15
  161. package/src/migrations/update-14-5-3/add-gitignore-entry.js.map +0 -1
  162. package/src/migrations/update-14-5-3/update-dev-output-path.d.ts +0 -3
  163. package/src/migrations/update-14-5-3/update-dev-output-path.js +0 -29
  164. package/src/migrations/update-14-5-3/update-dev-output-path.js.map +0 -1
  165. package/src/migrations/update-14-5-7/update-next-eslint.d.ts +0 -3
  166. package/src/migrations/update-14-5-7/update-next-eslint.js +0 -32
  167. package/src/migrations/update-14-5-7/update-next-eslint.js.map +0 -1
  168. package/src/migrations/update-15-8-8/add-style-packages.d.ts +0 -3
  169. package/src/migrations/update-15-8-8/add-style-packages.js +0 -28
  170. package/src/migrations/update-15-8-8/add-style-packages.js.map +0 -1
  171. package/src/utils/add-gitignore-entry.d.ts +0 -2
  172. package/src/utils/add-gitignore-entry.js +0 -18
  173. package/src/utils/add-gitignore-entry.js.map +0 -1
  174. package/src/utils/config-invalid-function.fixture.d.ts +0 -0
  175. package/src/utils/config-invalid-function.fixture.js +0 -2
  176. package/src/utils/config-invalid-function.fixture.js.map +0 -1
  177. package/src/utils/config-not-a-function.fixture.d.ts +0 -0
  178. package/src/utils/config-not-a-function.fixture.js +0 -2
  179. package/src/utils/config-not-a-function.fixture.js.map +0 -1
  180. package/src/utils/config.d.ts +0 -4
  181. package/src/utils/config.fixture.d.ts +0 -0
  182. package/src/utils/config.fixture.js +0 -4
  183. package/src/utils/config.fixture.js.map +0 -1
  184. package/src/utils/config.js +0 -65
  185. package/src/utils/config.js.map +0 -1
  186. package/src/utils/constants.d.ts +0 -1
  187. package/src/utils/constants.js +0 -5
  188. package/src/utils/constants.js.map +0 -1
  189. package/src/utils/create-copy-plugin.d.ts +0 -2
  190. package/src/utils/create-copy-plugin.js +0 -63
  191. package/src/utils/create-copy-plugin.js.map +0 -1
  192. package/src/utils/generate-globs.d.ts +0 -5
  193. package/src/utils/generate-globs.js +0 -30
  194. package/src/utils/generate-globs.js.map +0 -1
  195. package/src/utils/styles.d.ts +0 -40
  196. package/src/utils/styles.js +0 -56
  197. package/src/utils/styles.js.map +0 -1
  198. package/src/utils/types.d.ts +0 -57
  199. package/src/utils/types.js +0 -3
  200. package/src/utils/types.js.map +0 -1
  201. package/src/utils/versions.d.ts +0 -9
  202. package/src/utils/versions.js +0 -13
  203. package/src/utils/versions.js.map +0 -1
@@ -1,3 +0,0 @@
1
- import type { ExecutorContext } from '@nrwl/devkit';
2
- import type { PackageJson } from 'nx/src/utils/package-json';
3
- export declare function updatePackageJson(packageJson: PackageJson, context: ExecutorContext): void;
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updatePackageJson = void 0;
4
- function updatePackageJson(packageJson, context) {
5
- var _a, _b;
6
- var _c;
7
- if (!packageJson.scripts) {
8
- packageJson.scripts = {};
9
- }
10
- if (!packageJson.scripts.start) {
11
- packageJson.scripts.start = 'next start';
12
- }
13
- (_a = packageJson.dependencies) !== null && _a !== void 0 ? _a : (packageJson.dependencies = {});
14
- // These are always required for a production Next.js app to run.
15
- const requiredPackages = ['react', 'react-dom', 'next', 'typescript'];
16
- for (const pkg of requiredPackages) {
17
- const externalNode = context.projectGraph.externalNodes[`npm:${pkg}`];
18
- if (externalNode) {
19
- (_b = (_c = packageJson.dependencies)[pkg]) !== null && _b !== void 0 ? _b : (_c[pkg] = externalNode.data.version);
20
- }
21
- }
22
- }
23
- exports.updatePackageJson = updatePackageJson;
24
- //# sourceMappingURL=update-package-json.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"update-package-json.js","sourceRoot":"","sources":["../../../../../../../packages/next/src/executors/build/lib/update-package-json.ts"],"names":[],"mappings":";;;AAGA,SAAgB,iBAAiB,CAC/B,WAAwB,EACxB,OAAwB;;;IAExB,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE;QACxB,WAAW,CAAC,OAAO,GAAG,EAAE,CAAC;KAC1B;IACD,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE;QAC9B,WAAW,CAAC,OAAO,CAAC,KAAK,GAAG,YAAY,CAAC;KAC1C;IAED,MAAA,WAAW,CAAC,YAAY,oCAAxB,WAAW,CAAC,YAAY,GAAK,EAAE,EAAC;IAEhC,iEAAiE;IACjE,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;IACtE,KAAK,MAAM,GAAG,IAAI,gBAAgB,EAAE;QAClC,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC,aAAa,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;QACtE,IAAI,YAAY,EAAE;YAChB,YAAA,WAAW,CAAC,YAAY,EAAC,GAAG,wCAAH,GAAG,IAAM,YAAY,CAAC,IAAI,CAAC,OAAO,EAAC;SAC7D;KACF;AACH,CAAC;AArBD,8CAqBC"}
@@ -1,68 +0,0 @@
1
- {
2
- "version": 2,
3
- "outputCapture": "direct-nodejs",
4
- "$schema": "http://json-schema.org/schema",
5
- "cli": "nx",
6
- "title": "Next Build",
7
- "description": "Build a Next.js app.",
8
- "type": "object",
9
- "properties": {
10
- "root": {
11
- "description": "The source root",
12
- "type": "string",
13
- "x-priority": "important"
14
- },
15
- "outputPath": {
16
- "type": "string",
17
- "description": "The output path of the generated files.",
18
- "x-completion-type": "directory",
19
- "x-priority": "important"
20
- },
21
- "fileReplacements": {
22
- "description": "Replace files with other files in the build.",
23
- "type": "array",
24
- "items": {
25
- "type": "object",
26
- "properties": {
27
- "replace": {
28
- "type": "string",
29
- "description": "The file to be replaced.",
30
- "x-completion-type": "file"
31
- },
32
- "with": {
33
- "type": "string",
34
- "description": "The file to replace with.",
35
- "x-completion-type": "file"
36
- }
37
- },
38
- "additionalProperties": false,
39
- "required": ["replace", "with"]
40
- },
41
- "default": []
42
- },
43
- "nextConfig": {
44
- "description": "Path (relative to workspace root) to a function which takes phase, config, and builder options, and returns the resulting config. This is an advanced option and should not be used with a normal Next.js config file (i.e. `next.config.js`).",
45
- "type": "string",
46
- "x-completion-type": "file",
47
- "x-completion-glob": "next?(*).js",
48
- "x-priority": "important"
49
- },
50
- "buildLibsFromSource": {
51
- "type": "boolean",
52
- "description": "Read buildable libraries from source instead of building them separately.",
53
- "default": true
54
- },
55
- "includeDevDependenciesInPackageJson": {
56
- "type": "boolean",
57
- "description": "Include `devDependencies` in the generated package.json file. By default only production `dependencies` are included.",
58
- "default": false
59
- },
60
- "generateLockfile": {
61
- "type": "boolean",
62
- "description": "Generate a lockfile (e.g. yarn.lock) that matches the workspace lockfile to ensure package versions match.",
63
- "default": false,
64
- "x-priority": "internal"
65
- }
66
- },
67
- "required": ["root", "outputPath"]
68
- }
@@ -1,2 +0,0 @@
1
- declare const _default: any;
2
- export default _default;
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const devkit_1 = require("@nrwl/devkit");
4
- const export_impl_1 = require("./export.impl");
5
- exports.default = (0, devkit_1.convertNxExecutor)(export_impl_1.default);
6
- //# sourceMappingURL=compat.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../packages/next/src/executors/export/compat.ts"],"names":[],"mappings":";;AAAA,yCAAiD;AAEjD,+CAA2C;AAE3C,kBAAe,IAAA,0BAAiB,EAAC,qBAAc,CAAC,CAAC"}
@@ -1,6 +0,0 @@
1
- import 'dotenv/config';
2
- import { ExecutorContext } from '@nrwl/devkit';
3
- import { NextExportBuilderOptions } from '../../utils/types';
4
- export default function exportExecutor(options: NextExportBuilderOptions, context: ExecutorContext): Promise<{
5
- success: boolean;
6
- }>;
@@ -1,53 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- require("dotenv/config");
5
- const devkit_1 = require("@nrwl/devkit");
6
- const export_1 = require("next/dist/export");
7
- const path_1 = require("path");
8
- const buildable_libs_utils_1 = require("@nrwl/js/src/utils/buildable-libs-utils");
9
- const nextTrace = require("next/dist/trace");
10
- const os_1 = require("os");
11
- const child_process_1 = require("child_process");
12
- const chalk = require("chalk");
13
- // platform specific command name
14
- const pmCmd = (0, os_1.platform)() === 'win32' ? `npx.cmd` : 'npx';
15
- function exportExecutor(options, context) {
16
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
17
- let dependencies = [];
18
- if (!options.buildLibsFromSource) {
19
- const result = (0, buildable_libs_utils_1.calculateProjectDependencies)(context.projectGraph, context.root, context.projectName, 'build', // this should be generalized
20
- context.configurationName);
21
- dependencies = result.dependencies;
22
- }
23
- const libsDir = (0, path_1.join)(context.root, (0, devkit_1.workspaceLayout)().libsDir);
24
- const buildTarget = (0, devkit_1.parseTargetString)(options.buildTarget, context.projectGraph);
25
- try {
26
- const args = getBuildTargetCommand(options);
27
- (0, child_process_1.execFileSync)(pmCmd, args, {
28
- stdio: [0, 1, 2],
29
- });
30
- }
31
- catch (_a) {
32
- throw new Error(`Build target failed: ${chalk.bold(options.buildTarget)}`);
33
- }
34
- const buildOptions = (0, devkit_1.readTargetOptions)(buildTarget, context);
35
- const root = (0, path_1.resolve)(context.root, buildOptions.root);
36
- // Taken from:
37
- // https://github.com/vercel/next.js/blob/ead56eaab68409e96c19f7d9139747bac1197aa9/packages/next/cli/next-export.ts#L13
38
- const nextExportCliSpan = nextTrace.trace('next-export-cli');
39
- yield (0, export_1.default)(root, {
40
- statusMessage: 'Exporting',
41
- silent: options.silent,
42
- threads: options.threads,
43
- outdir: `${buildOptions.outputPath}/exported`,
44
- }, nextExportCliSpan);
45
- return { success: true };
46
- });
47
- }
48
- exports.default = exportExecutor;
49
- function getBuildTargetCommand(options) {
50
- const cmd = ['nx', 'run', options.buildTarget];
51
- return cmd;
52
- }
53
- //# sourceMappingURL=export.impl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"export.impl.js","sourceRoot":"","sources":["../../../../../../packages/next/src/executors/export/export.impl.ts"],"names":[],"mappings":";;;AAAA,yBAAuB;AACvB,yCAKsB;AACtB,6CAAyC;AACzC,+BAAqC;AACrC,kFAGiD;AAOjD,6CAA8C;AAC9C,2BAA8B;AAC9B,iDAA6C;AAC7C,+BAA+B;AAE/B,iCAAiC;AACjC,MAAM,KAAK,GAAG,IAAA,aAAQ,GAAE,KAAK,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC;AAEzD,SAA8B,cAAc,CAC1C,OAAiC,EACjC,OAAwB;;QAExB,IAAI,YAAY,GAAoC,EAAE,CAAC;QACvD,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE;YAChC,MAAM,MAAM,GAAG,IAAA,mDAA4B,EACzC,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,WAAW,EACnB,OAAO,EAAE,6BAA6B;YACtC,OAAO,CAAC,iBAAiB,CAC1B,CAAC;YACF,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;SACpC;QAED,MAAM,OAAO,GAAG,IAAA,WAA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+0,0 @@
1
- {
2
- "version": 2,
3
- "outputCapture": "direct-nodejs",
4
- "cli": "nx",
5
- "title": "Next Export",
6
- "description": "Export a Next.js application. The exported application is located at `dist/$outputPath/exported`.",
7
- "type": "object",
8
- "properties": {
9
- "buildTarget": {
10
- "type": "string",
11
- "description": "Target which builds the application",
12
- "x-priority": "important"
13
- },
14
- "silent": {
15
- "type": "boolean",
16
- "description": "Hide progress or not (default is `false`)",
17
- "default": false
18
- },
19
- "threads": {
20
- "type": "number",
21
- "description": "Number of worker threads to utilize (defaults to the number of CPUs)"
22
- },
23
- "buildLibsFromSource": {
24
- "type": "boolean",
25
- "description": "Read buildable libraries from source instead of building them separately.",
26
- "default": true
27
- }
28
- },
29
- "required": []
30
- }
@@ -1,2 +0,0 @@
1
- declare const _default: any;
2
- export default _default;
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const devkit_1 = require("@nrwl/devkit");
4
- const server_impl_1 = require("./server.impl");
5
- exports.default = (0, devkit_1.convertNxExecutor)(server_impl_1.default);
6
- //# sourceMappingURL=compat.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../packages/next/src/executors/server/compat.ts"],"names":[],"mappings":";;AAAA,yCAAiD;AAEjD,+CAA2C;AAE3C,kBAAe,IAAA,0BAAiB,EAAC,qBAAc,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- import { NextServerOptions, ProxyConfig } from '../../../utils/types';
2
- export declare function customServer(settings: NextServerOptions, proxyConfig?: ProxyConfig): Promise<void>;
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.customServer = void 0;
4
- const devkit_1 = require("@nrwl/devkit");
5
- const next_1 = require("next");
6
- const tsnode_register_1 = require("./tsnode-register");
7
- function customServer(settings, proxyConfig) {
8
- const nextApp = (0, next_1.default)(settings);
9
- (0, tsnode_register_1.tsNodeRegister)((0, devkit_1.joinPathFragments)(settings.dir, settings.path), (0, devkit_1.joinPathFragments)(settings.dir, 'tsconfig.json'));
10
- const customServerModule = require((0, devkit_1.joinPathFragments)(settings.dir, settings.path));
11
- const customServer = customServerModule.default || customServerModule;
12
- return customServer(nextApp, settings, proxyConfig);
13
- }
14
- exports.customServer = customServer;
15
- //# sourceMappingURL=custom-server.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"custom-server.js","sourceRoot":"","sources":["../../../../../../../packages/next/src/executors/server/lib/custom-server.ts"],"names":[],"mappings":";;;AAAA,yCAAiD;AACjD,+BAAwB;AAExB,uDAAmD;AAEnD,SAAgB,YAAY,CAC1B,QAA2B,EAC3B,WAAyB;IAEzB,MAAM,OAAO,GAAG,IAAA,cAAI,EAAC,QAAQ,CAAC,CAAC;IAE/B,IAAA,gCAAc,EACZ,IAAA,0BAAiB,EAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,IAAI,CAAC,EAC9C,IAAA,0BAAiB,EAAC,QAAQ,CAAC,GAAG,EAAE,eAAe,CAAC,CACjD,CAAC;IAEF,MAAM,kBAAkB,GAAG,OAAO,CAAC,IAAA,0BAAiB,EAClD,QAAQ,CAAC,GAAG,EACZ,QAAQ,CAAC,IAAI,CACd,CAAC,CAAC;IACH,MAAM,YAAY,GAAG,kBAAkB,CAAC,OAAO,IAAI,kBAAkB,CAAC;IACtE,OAAO,YAAY,CAAC,OAAO,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;AACtD,CAAC;AAjBD,oCAiBC"}
@@ -1,6 +0,0 @@
1
- import { NextServerOptions, ProxyConfig } from '../../../utils/types';
2
- /**
3
- * Adapted from https://github.com/zeit/next.js/blob/master/examples/with-custom-reverse-proxy/server.js
4
- * @param settings
5
- */
6
- export declare function defaultServer(settings: NextServerOptions, proxyConfig?: ProxyConfig): Promise<void>;
@@ -1,34 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.defaultServer = void 0;
4
- const tslib_1 = require("tslib");
5
- const express = require("express");
6
- const path = require("path");
7
- const next_1 = require("next");
8
- /**
9
- * Adapted from https://github.com/zeit/next.js/blob/master/examples/with-custom-reverse-proxy/server.js
10
- * @param settings
11
- */
12
- function defaultServer(settings, proxyConfig) {
13
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
14
- const app = (0, next_1.default)(settings);
15
- const handle = app.getRequestHandler();
16
- yield app.prepare();
17
- const server = express();
18
- server.disable('x-powered-by');
19
- // Serve shared assets copied to `public` folder
20
- server.use(express.static(path.resolve(settings.dir, 'public')));
21
- // Set up the proxy.
22
- if (proxyConfig) {
23
- const proxyMiddleware = require('http-proxy-middleware').createProxyMiddleware;
24
- Object.keys(proxyConfig).forEach((context) => {
25
- server.use(proxyMiddleware(context, proxyConfig[context]));
26
- });
27
- }
28
- // Default catch-all handler to allow Next.js to handle all other routes
29
- server.all('*', (req, res) => handle(req, res));
30
- server.listen(settings.port, settings.hostname);
31
- });
32
- }
33
- exports.defaultServer = defaultServer;
34
- //# sourceMappingURL=default-server.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"default-server.js","sourceRoot":"","sources":["../../../../../../../packages/next/src/executors/server/lib/default-server.ts"],"names":[],"mappings":";;;;AAAA,mCAAmC;AACnC,6BAA6B;AAC7B,+BAAwB;AAGxB;;;GAGG;AACH,SAAsB,aAAa,CACjC,QAA2B,EAC3B,WAAyB;;QAEzB,MAAM,GAAG,GAAG,IAAA,cAAI,EAAC,QAAQ,CAAC,CAAC;QAC3B,MAAM,MAAM,GAAG,GAAG,CAAC,iBAAiB,EAAE,CAAC;QAEvC,MAAM,GAAG,CAAC,OAAO,EAAE,CAAC;QAEpB,MAAM,MAAM,GAAoB,OAAO,EAAE,CAAC;QAC1C,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;QAE/B,gDAAgD;QAChD,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;QAEjE,oBAAoB;QACpB,IAAI,WAAW,EAAE;YACf,MAAM,eAAe,GACnB,OAAO,CAAC,uBAAuB,CAAC,CAAC,qBAAqB,CAAC;YACzD,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;gBAC3C,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YAC7D,CAAC,CAAC,CAAC;SACJ;QAED,wEAAwE;QACxE,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;QAEhD,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAClD,CAAC;CAAA;AA5BD,sCA4BC"}
@@ -1 +0,0 @@
1
- export declare function tsNodeRegister(file?: string, tsConfig?: string): void;
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.tsNodeRegister = void 0;
4
- function tsNodeRegister(file = '', tsConfig) {
5
- if (file && file.endsWith('.ts')) {
6
- // Register TS compiler lazily
7
- require('ts-node').register({
8
- project: tsConfig,
9
- compilerOptions: {
10
- module: 'CommonJS',
11
- types: ['node'],
12
- },
13
- });
14
- // Register paths in tsConfig
15
- const tsconfigPaths = require('tsconfig-paths');
16
- const { absoluteBaseUrl: baseUrl, paths } = tsconfigPaths.loadConfig(tsConfig);
17
- if (baseUrl && paths) {
18
- tsconfigPaths.register({ baseUrl, paths });
19
- }
20
- }
21
- }
22
- exports.tsNodeRegister = tsNodeRegister;
23
- //# sourceMappingURL=tsnode-register.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tsnode-register.js","sourceRoot":"","sources":["../../../../../../../packages/next/src/executors/server/lib/tsnode-register.ts"],"names":[],"mappings":";;;AAAA,SAAgB,cAAc,CAAC,OAAe,EAAE,EAAE,QAAiB;IACjE,IAAI,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;QAChC,8BAA8B;QAC9B,OAAO,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC;YAC1B,OAAO,EAAE,QAAQ;YACjB,eAAe,EAAE;gBACf,MAAM,EAAE,UAAU;gBAClB,KAAK,EAAE,CAAC,MAAM,CAAC;aAChB;SACF,CAAC,CAAC;QAEH,6BAA6B;QAC7B,MAAM,aAAa,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;QAChD,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,KAAK,EAAE,GACvC,aAAa,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QACrC,IAAI,OAAO,IAAI,KAAK,EAAE;YACpB,aAAa,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;SAC5C;KACF;AACH,CAAC;AAnBD,wCAmBC"}
@@ -1,61 +0,0 @@
1
- {
2
- "version": 2,
3
- "outputCapture": "direct-nodejs",
4
- "cli": "nx",
5
- "title": "Next Serve",
6
- "description": "Serve a Next.js app.",
7
- "type": "object",
8
- "properties": {
9
- "dev": {
10
- "type": "boolean",
11
- "description": "Serve the application in the dev mode.",
12
- "default": true
13
- },
14
- "buildTarget": {
15
- "type": "string",
16
- "description": "Target which builds the application.",
17
- "x-priority": "important"
18
- },
19
- "port": {
20
- "type": "number",
21
- "description": "Port to listen on.",
22
- "default": 4200,
23
- "x-priority": "important"
24
- },
25
- "staticMarkup": {
26
- "type": "boolean",
27
- "description": "Static markup.",
28
- "default": false
29
- },
30
- "quiet": {
31
- "type": "boolean",
32
- "description": "Hide error messages containing server information.",
33
- "default": false
34
- },
35
- "customServerTarget": {
36
- "type": "string",
37
- "description": "Target which builds the custom server."
38
- },
39
- "customServerPath": {
40
- "type": "string",
41
- "description": "Use a custom server script.",
42
- "x-deprecated": "Use `customServerTarget` instead."
43
- },
44
- "hostname": {
45
- "type": "string",
46
- "description": "Hostname on which the application is served."
47
- },
48
- "proxyConfig": {
49
- "type": "string",
50
- "description": "Path to the proxy configuration file.",
51
- "x-completion-type": "file",
52
- "x-deprecated": "Use the built-in rewrite feature from Next.js. See: https://nextjs.org/docs/api-reference/next.config.js/rewrites"
53
- },
54
- "buildLibsFromSource": {
55
- "type": "boolean",
56
- "description": "Read buildable libraries from source instead of building them separately.",
57
- "default": true
58
- }
59
- },
60
- "required": ["buildTarget"]
61
- }
@@ -1,7 +0,0 @@
1
- import 'dotenv/config';
2
- import { ExecutorContext } from '@nrwl/devkit';
3
- import { NextServeBuilderOptions } from '../../utils/types';
4
- export default function serveExecutor(options: NextServeBuilderOptions, context: ExecutorContext): AsyncGenerator<{
5
- success: boolean;
6
- baseUrl: string;
7
- }, void, unknown>;
@@ -1,120 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- require("dotenv/config");
5
- const devkit_1 = require("@nrwl/devkit");
6
- const chalk = require("chalk");
7
- const fs_1 = require("fs");
8
- const path_1 = require("path");
9
- const custom_server_1 = require("./lib/custom-server");
10
- const default_server_1 = require("./lib/default-server");
11
- function serveExecutor(options, context) {
12
- return tslib_1.__asyncGenerator(this, arguments, function* serveExecutor_1() {
13
- // Cast to any to overwrite NODE_ENV
14
- process.env.NODE_ENV = process.env.NODE_ENV
15
- ? process.env.NODE_ENV
16
- : options.dev
17
- ? 'development'
18
- : 'production';
19
- // Setting port that the custom server should use.
20
- process.env.PORT = options.port;
21
- const buildOptions = (0, devkit_1.readTargetOptions)((0, devkit_1.parseTargetString)(options.buildTarget, context.projectGraph), context);
22
- const root = (0, path_1.resolve)(context.root, buildOptions.root);
23
- if (options.customServerTarget) {
24
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(runCustomServer(root, options, buildOptions, context))));
25
- }
26
- else {
27
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(runNextDevServer(root, options, buildOptions, context))));
28
- }
29
- });
30
- }
31
- exports.default = serveExecutor;
32
- function runNextDevServer(root, options, buildOptions, context) {
33
- return tslib_1.__asyncGenerator(this, arguments, function* runNextDevServer_1() {
34
- const baseUrl = `http://${options.hostname || 'localhost'}:${options.port}`;
35
- const settings = {
36
- dev: options.dev,
37
- dir: root,
38
- staticMarkup: options.staticMarkup,
39
- quiet: options.quiet,
40
- port: options.port,
41
- customServer: !!options.customServerTarget,
42
- hostname: options.hostname || 'localhost',
43
- // TOOD(jack): Remove in Nx 15
44
- path: options.customServerPath,
45
- };
46
- const server = options.customServerPath
47
- ? custom_server_1.customServer
48
- : default_server_1.defaultServer;
49
- // look for the proxy.conf.json
50
- let proxyConfig;
51
- const proxyConfigPath = options.proxyConfig
52
- ? (0, path_1.join)(context.root, options.proxyConfig)
53
- : (0, path_1.join)(root, 'proxy.conf.json');
54
- // TODO(v16): Remove proxy support.
55
- if ((0, fs_1.existsSync)(proxyConfigPath)) {
56
- devkit_1.logger.warn(`The "proxyConfig" option will be removed in Nx 16. Use the "rewrites" feature from Next.js instead. See: https://nextjs.org/docs/api-reference/next.config.js/rewrites`);
57
- proxyConfig = require(proxyConfigPath);
58
- }
59
- try {
60
- yield tslib_1.__await(server(settings, proxyConfig));
61
- devkit_1.logger.info(`[ ${chalk.green('ready')} ] on ${baseUrl}`);
62
- yield yield tslib_1.__await({
63
- baseUrl,
64
- success: true,
65
- });
66
- // This Promise intentionally never resolves, leaving the process running
67
- yield tslib_1.__await(new Promise(() => { }));
68
- }
69
- catch (e) {
70
- if (options.dev) {
71
- throw e;
72
- }
73
- else {
74
- if (process.env.NX_VERBOSE_LOGGING) {
75
- console.error(e);
76
- }
77
- throw new Error(`Could not start production server. Try building your app with \`nx build ${context.projectName}\`.`);
78
- }
79
- }
80
- });
81
- }
82
- function runCustomServer(root, options, buildOptions, context) {
83
- return tslib_1.__asyncGenerator(this, arguments, function* runCustomServer_1() {
84
- var _a, e_1, _b, _c;
85
- process.env.NX_NEXT_DIR = root;
86
- process.env.NX_NEXT_PUBLIC_DIR = (0, path_1.join)(root, 'public');
87
- const baseUrl = `http://${options.hostname || 'localhost'}:${options.port}`;
88
- const customServerBuild = yield tslib_1.__await((0, devkit_1.runExecutor)((0, devkit_1.parseTargetString)(options.customServerTarget, context.projectGraph), {
89
- watch: options.dev ? true : false,
90
- }, context));
91
- try {
92
- for (var _d = true, customServerBuild_1 = tslib_1.__asyncValues(customServerBuild), customServerBuild_1_1; customServerBuild_1_1 = yield tslib_1.__await(customServerBuild_1.next()), _a = customServerBuild_1_1.done, !_a;) {
93
- _c = customServerBuild_1_1.value;
94
- _d = false;
95
- try {
96
- const result = _c;
97
- if (!result.success) {
98
- return yield tslib_1.__await(result);
99
- }
100
- yield yield tslib_1.__await({
101
- success: true,
102
- baseUrl,
103
- });
104
- }
105
- finally {
106
- _d = true;
107
- }
108
- }
109
- }
110
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
111
- finally {
112
- try {
113
- if (!_d && !_a && (_b = customServerBuild_1.return)) yield tslib_1.__await(_b.call(customServerBuild_1));
114
- }
115
- finally { if (e_1) throw e_1.error; }
116
- }
117
- return yield tslib_1.__await({ success: true });
118
- });
119
- }
120
- //# sourceMappingURL=server.impl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"server.impl.js","sourceRoot":"","sources":["../../../../../../packages/next/src/executors/server/server.impl.ts"],"names":[],"mappings":";;;AAAA,yBAAuB;AACvB,yCAMsB;AACtB,+BAA+B;AAC/B,2BAAgC;AAChC,+BAAqC;AASrC,uDAAmD;AACnD,yDAAqD;AAErD,SAA+B,aAAa,CAC1C,OAAgC,EAChC,OAAwB;;QAExB,oCAAoC;QACnC,OAAO,CAAC,GAAW,CAAC,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,Q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CAAC;aACH;SACF;IACH,CAAC;CAAA;AAED,SAAgB,eAAe,CAC7B,IAAY,EACZ,OAAgC,EAChC,YAAqC,EACrC,OAAwB;;;QAExB,OAAO,CAAC,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC;QAC/B,OAAO,CAAC,GAAG,CAAC,kBAAkB,GAAG,IAAA,WAAI,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QAEtD,MAAM,OAAO,GAAG,UAAU,OAAO,CAAC,QAAQ,IAAI,WAAW,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;QAE5E,MAAM,iBAAiB,GAAG,sBAAM,IAAA,oBAAW,EACzC,IAAA,0BAAiB,EAAC,OAAO,CAAC,kBAAkB,EAAE,OAAO,CAAC,YAAY,CAAC,EACnE;YACE,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK;SAClC,EACD,OAAO,CACR,CAAA,CAAC;;YAEF,KAA2B,eAAA,sBAAA,sBAAA,iBAAiB,CAAA,uBAAA;gBAAjB,iCAAiB;gBAAjB,WAAiB;;oBAAjC,MAAM,MAAM,KAAA,CAAA;oBACrB,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;wBACnB,6BAAO,MAAM,EAAC;qBACf;oBACD,4BAAM;wBACJ,OAAO,EAAE,IAAI;wBACb,OAAO;qBACR,CAAA,CAAC;;;;;aACH;;;;;;;;;QAED,6BAAO,EAAE,OAAO,EAAE,IAAI,EAAE,EAAC;IAC3B,CAAC;CAAA"}
@@ -1,4 +0,0 @@
1
- import { Tree } from '@nrwl/devkit';
2
- import { Schema } from './schema';
3
- export declare function applicationGenerator(host: Tree, schema: Schema): Promise<import("@nrwl/devkit").GeneratorCallback>;
4
- export declare const applicationSchematic: (generatorOptions: Schema) => (tree: any, context: any) => Promise<any>;
@@ -1,45 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.applicationSchematic = exports.applicationGenerator = void 0;
4
- const tslib_1 = require("tslib");
5
- const devkit_1 = require("@nrwl/devkit");
6
- const normalize_options_1 = require("./lib/normalize-options");
7
- const add_cypress_1 = require("./lib/add-cypress");
8
- const add_jest_1 = require("./lib/add-jest");
9
- const add_project_1 = require("./lib/add-project");
10
- const create_application_files_1 = require("./lib/create-application-files");
11
- const create_next_server_files_1 = require("./lib/create-next-server-files");
12
- const set_defaults_1 = require("./lib/set-defaults");
13
- const update_jest_config_1 = require("./lib/update-jest-config");
14
- const init_1 = require("../init/init");
15
- const styles_1 = require("../../utils/styles");
16
- const add_linting_1 = require("./lib/add-linting");
17
- const custom_server_1 = require("../custom-server/custom-server");
18
- function applicationGenerator(host, schema) {
19
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
20
- const options = (0, normalize_options_1.normalizeOptions)(host, schema);
21
- const nextTask = yield (0, init_1.nextInitGenerator)(host, Object.assign(Object.assign({}, options), { skipFormat: true }));
22
- (0, create_application_files_1.createApplicationFiles)(host, options);
23
- (0, create_next_server_files_1.createNextServerFiles)(host, options);
24
- (0, add_project_1.addProject)(host, options);
25
- const cypressTask = yield (0, add_cypress_1.addCypress)(host, options);
26
- const jestTask = yield (0, add_jest_1.addJest)(host, options);
27
- const lintTask = yield (0, add_linting_1.addLinting)(host, options);
28
- (0, update_jest_config_1.updateJestConfig)(host, options);
29
- const styledTask = (0, styles_1.addStyleDependencies)(host, options.style);
30
- (0, set_defaults_1.setDefaults)(host, options);
31
- if (options.customServer) {
32
- yield (0, custom_server_1.customServerGenerator)(host, {
33
- project: options.name,
34
- compiler: options.swc ? 'swc' : 'tsc',
35
- });
36
- }
37
- if (!options.skipFormat) {
38
- yield (0, devkit_1.formatFiles)(host);
39
- }
40
- return (0, devkit_1.runTasksInSerial)(nextTask, cypressTask, jestTask, lintTask, styledTask);
41
- });
42
- }
43
- exports.applicationGenerator = applicationGenerator;
44
- exports.applicationSchematic = (0, devkit_1.convertNxGenerator)(applicationGenerator);
45
- //# sourceMappingURL=application.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"application.js","sourceRoot":"","sources":["../../../../../../packages/next/src/generators/application/application.ts"],"names":[],"mappings":";;;;AAAA,yCAKsB;AAEtB,+DAA2D;AAE3D,mDAA+C;AAC/C,6CAAyC;AACzC,mDAA+C;AAC/C,6EAAwE;AACxE,6EAAuE;AACvE,qDAAiD;AACjD,iEAA4D;AAC5D,uCAAiD;AACjD,+CAA0D;AAC1D,mDAA+C;AAC/C,kEAAuE;AAEvE,SAAsB,oBAAoB,CAAC,IAAU,EAAE,MAAc;;QACnE,MAAM,OAAO,GAAG,IAAA,oCAAgB,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAE/C,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAiB,EAAC,IAAI,kCACxC,OAAO,KACV,UAAU,EAAE,IAAI,IAChB,CAAC;QACH,IAAA,iDAAsB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACtC,IAAA,gDAAqB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACrC,IAAA,wBAAU,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC1B,MAAM,WAAW,GAAG,MAAM,IAAA,wBAAU,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACpD,MAAM,QAAQ,GAAG,MAAM,IAAA,kBAAO,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC9C,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAU,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACjD,IAAA,qCAAgB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAChC,MAAM,UAAU,GAAG,IAAA,6BAAoB,EAAC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;QAC7D,IAAA,0BAAW,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAE3B,IAAI,OAAO,CAAC,YAAY,EAAE;YACxB,MAAM,IAAA,qCAAqB,EAAC,IAAI,EAAE;gBAChC,OAAO,EAAE,OAAO,CAAC,IAAI;gBACrB,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK;aACtC,CAAC,CAAC;SACJ;QAED,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YACvB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;SACzB;QAED,OAAO,IAAA,yBAAgB,EACrB,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,UAAU,CACX,CAAC;IACJ,CAAC;CAAA;AAnCD,oDAmCC;AAEY,QAAA,oBAAoB,GAAG,IAAA,2BAAkB,EAAC,oBAAoB,CAAC,CAAC"}
@@ -1,21 +0,0 @@
1
- {
2
- "presets": [
3
- <% if (style === '@emotion/styled') { %>
4
- [
5
- "@nrwl/next/babel",
6
- {
7
- "preset-react": {
8
- "runtime": "automatic",
9
- "importSource": "@emotion/react"
10
- }
11
- }
12
- ]
13
- <% } else { %>
14
- "@nrwl/next/babel"
15
- <% } %>
16
- ],
17
- "plugins": [
18
- <% if (style === '@emotion/styled') { %>"@emotion/babel-plugin"<% } %>
19
- <% if (style === 'styled-components') { %>["styled-components", { "pure": true, "ssr": true }]<% } %>
20
- ]
21
- }
@@ -1,18 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */
2
- declare module '*.svg' {
3
- const content: any;
4
- export const ReactComponent: any;
5
- export default content;
6
- }
7
-
8
- <% if (style === 'less') { %>
9
- declare module '*.module.less' {
10
- const classes: { readonly [key: string]: string };
11
- export default classes;
12
- }
13
- <% } else if (style === 'styl') { %>
14
- declare module '*.module.styl' {
15
- const classes: { readonly [key: string]: string };
16
- export default classes;
17
- }
18
- <% } %>