@nrwl/next 14.8.8 → 14.9.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.
- package/CHANGELOG.md +1 -1
- package/LICENSE +22 -22
- package/README.md +5 -26
- package/migrations.json +34 -115
- package/package.json +14 -13
- package/plugins/with-nx.d.ts +1 -101
- package/plugins/with-nx.js +7 -3
- package/plugins/with-nx.js.map +1 -1
- package/src/executors/build/build.impl.js +19 -5
- package/src/executors/build/build.impl.js.map +1 -1
- package/src/executors/build/lib/create-next-config-file.js +1 -1
- package/src/executors/build/lib/create-next-config-file.js.map +1 -1
- package/src/executors/build/lib/update-package-json.d.ts +3 -0
- package/src/executors/build/lib/update-package-json.js +18 -0
- package/src/executors/build/lib/update-package-json.js.map +1 -0
- package/src/executors/build/schema.json +14 -4
- package/src/executors/export/export.impl.js +15 -9
- package/src/executors/export/export.impl.js.map +1 -1
- package/src/executors/export/schema.json +4 -1
- package/src/executors/server/schema.json +8 -4
- package/src/executors/server/server.impl.js +21 -14
- package/src/executors/server/server.impl.js.map +1 -1
- package/src/generators/application/application.js +1 -2
- package/src/generators/application/application.js.map +1 -1
- package/src/generators/application/files/next.config.js__tmpl__ +1 -1
- package/src/generators/application/files/tsconfig.json__tmpl__ +1 -1
- package/src/generators/application/lib/add-jest.d.ts +1 -1
- package/src/generators/application/lib/add-linting.js +19 -23
- package/src/generators/application/lib/add-linting.js.map +1 -1
- package/src/generators/application/lib/add-project.js +3 -3
- package/src/generators/application/lib/add-project.js.map +1 -1
- package/src/generators/application/lib/create-application-files.d.ts +1 -1
- package/src/generators/application/lib/create-application-files.helpers.js +2 -2
- package/src/generators/application/lib/create-application-files.js +3 -3
- package/src/generators/application/lib/create-application-files.js.map +1 -1
- package/src/generators/application/lib/normalize-options.js +6 -5
- package/src/generators/application/lib/normalize-options.js.map +1 -1
- package/src/generators/application/lib/set-defaults.js +6 -9
- package/src/generators/application/lib/set-defaults.js.map +1 -1
- package/src/generators/application/schema.d.ts +1 -1
- package/src/generators/application/schema.json +18 -17
- package/src/generators/component/component.d.ts +2 -0
- package/src/generators/component/component.js +2 -3
- package/src/generators/component/component.js.map +1 -1
- package/src/generators/component/schema.json +22 -15
- package/src/generators/custom-server/schema.json +4 -8
- package/src/generators/init/init.js +19 -15
- package/src/generators/init/init.js.map +1 -1
- package/src/generators/init/schema.d.ts +1 -0
- package/src/generators/init/schema.json +6 -0
- package/src/generators/library/library.js +3 -4
- package/src/generators/library/library.js.map +1 -1
- package/src/generators/library/schema.d.ts +1 -0
- package/src/generators/library/schema.json +16 -15
- package/src/generators/page/page.js +1 -2
- package/src/generators/page/page.js.map +1 -1
- package/src/generators/page/schema.json +10 -11
- package/src/utils/buildable-libs.d.ts +1 -1
- package/src/utils/buildable-libs.js +1 -1
- package/src/utils/buildable-libs.js.map +1 -1
- package/src/utils/config.d.ts +1 -1
- package/src/utils/config.js +1 -1
- package/src/utils/config.js.map +1 -1
- package/src/utils/styles.js +5 -5
- package/src/utils/styles.js.map +1 -1
- package/src/utils/types.d.ts +2 -1
- package/src/utils/versions.d.ts +4 -4
- package/src/utils/versions.js +4 -4
- package/src/executors/build/lib/create-package-json.d.ts +0 -3
- package/src/executors/build/lib/create-package-json.js +0 -29
- package/src/executors/build/lib/create-package-json.js.map +0 -1
- package/src/migrations/update-10-1-0/update-10-1-0.d.ts +0 -2
- package/src/migrations/update-10-1-0/update-10-1-0.js +0 -13
- package/src/migrations/update-10-1-0/update-10-1-0.js.map +0 -1
- package/src/migrations/update-11-0-0/rename-emotion-packages-11-0-0.d.ts +0 -1
- package/src/migrations/update-11-0-0/rename-emotion-packages-11-0-0.js +0 -15
- package/src/migrations/update-11-0-0/rename-emotion-packages-11-0-0.js.map +0 -1
- package/src/migrations/update-11-0-0/update-11-0-0.d.ts +0 -2
- package/src/migrations/update-11-0-0/update-11-0-0.js +0 -13
- package/src/migrations/update-11-0-0/update-11-0-0.js.map +0 -1
- package/src/migrations/update-11-5-0/remove-tsconfig-app-11-5-0.d.ts +0 -3
- package/src/migrations/update-11-5-0/remove-tsconfig-app-11-5-0.js +0 -32
- package/src/migrations/update-11-5-0/remove-tsconfig-app-11-5-0.js.map +0 -1
- package/src/migrations/update-11-5-0/update-babel-config.d.ts +0 -3
- package/src/migrations/update-11-5-0/update-babel-config.js +0 -24
- package/src/migrations/update-11-5-0/update-babel-config.js.map +0 -1
- package/src/migrations/update-11-6-0/add-js-include-11-6-0.d.ts +0 -3
- package/src/migrations/update-11-6-0/add-js-include-11-6-0.js +0 -29
- package/src/migrations/update-11-6-0/add-js-include-11-6-0.js.map +0 -1
- package/src/migrations/update-12-6-0/add-next-eslint.d.ts +0 -3
- package/src/migrations/update-12-6-0/add-next-eslint.js +0 -40
- package/src/migrations/update-12-6-0/add-next-eslint.js.map +0 -1
- package/src/migrations/update-8-10-0/update-8-10-0.d.ts +0 -2
- package/src/migrations/update-8-10-0/update-8-10-0.js +0 -13
- package/src/migrations/update-8-10-0/update-8-10-0.js.map +0 -1
- package/src/migrations/update-9-2-0/create-next-config.d.ts +0 -2
- package/src/migrations/update-9-2-0/create-next-config.js +0 -51
- package/src/migrations/update-9-2-0/create-next-config.js.map +0 -1
- package/src/migrations/update-9-3-1/update-9-3-1.d.ts +0 -2
- package/src/migrations/update-9-3-1/update-9-3-1.js +0 -19
- package/src/migrations/update-9-3-1/update-9-3-1.js.map +0 -1
|
@@ -4,12 +4,6 @@
|
|
|
4
4
|
"$id": "NxNextApp",
|
|
5
5
|
"title": "Create a Next.js Application for Nx",
|
|
6
6
|
"description": "Create a Next.js Application for Nx.",
|
|
7
|
-
"examples": [
|
|
8
|
-
{
|
|
9
|
-
"command": "nx g app myapp --directory=myorg",
|
|
10
|
-
"description": "Generate `apps/myorg/myapp` and `apps/myorg/myapp-e2e`"
|
|
11
|
-
}
|
|
12
|
-
],
|
|
13
7
|
"type": "object",
|
|
14
8
|
"properties": {
|
|
15
9
|
"name": {
|
|
@@ -20,12 +14,14 @@
|
|
|
20
14
|
"index": 0
|
|
21
15
|
},
|
|
22
16
|
"x-prompt": "What name would you like to use for the application?",
|
|
23
|
-
"pattern": "^[a-zA-Z].*$"
|
|
17
|
+
"pattern": "^[a-zA-Z].*$",
|
|
18
|
+
"x-priority": "important"
|
|
24
19
|
},
|
|
25
20
|
"directory": {
|
|
26
21
|
"description": "The directory of the new application.",
|
|
27
22
|
"type": "string",
|
|
28
|
-
"alias": "d"
|
|
23
|
+
"alias": "d",
|
|
24
|
+
"x-priority": "important"
|
|
29
25
|
},
|
|
30
26
|
"style": {
|
|
31
27
|
"description": "The file extension to be used for style files.",
|
|
@@ -71,18 +67,14 @@
|
|
|
71
67
|
"linter": {
|
|
72
68
|
"description": "The tool to use for running lint checks.",
|
|
73
69
|
"type": "string",
|
|
74
|
-
"enum": ["eslint"
|
|
70
|
+
"enum": ["eslint"],
|
|
75
71
|
"default": "eslint"
|
|
76
72
|
},
|
|
77
73
|
"skipFormat": {
|
|
78
74
|
"description": "Skip formatting files.",
|
|
79
75
|
"type": "boolean",
|
|
80
|
-
"default": false
|
|
81
|
-
|
|
82
|
-
"skipWorkspaceJson": {
|
|
83
|
-
"description": "Skip updating `workspace.json` with default options based on values provided to this app (e.g. `babel`, `style`).",
|
|
84
|
-
"type": "boolean",
|
|
85
|
-
"default": false
|
|
76
|
+
"default": false,
|
|
77
|
+
"x-priority": "internal"
|
|
86
78
|
},
|
|
87
79
|
"unitTestRunner": {
|
|
88
80
|
"type": "string",
|
|
@@ -113,7 +105,9 @@
|
|
|
113
105
|
},
|
|
114
106
|
"standaloneConfig": {
|
|
115
107
|
"description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json`",
|
|
116
|
-
"type": "boolean"
|
|
108
|
+
"type": "boolean",
|
|
109
|
+
"default": true,
|
|
110
|
+
"x-deprecated": "Nx only supports standaloneConfig"
|
|
117
111
|
},
|
|
118
112
|
"swc": {
|
|
119
113
|
"description": "Enable the Rust-based compiler SWC to compile JS/TS files.",
|
|
@@ -124,7 +118,14 @@
|
|
|
124
118
|
"description": "Use a custom Express server for the Next.js application.",
|
|
125
119
|
"type": "boolean",
|
|
126
120
|
"default": false
|
|
121
|
+
},
|
|
122
|
+
"skipPackageJson": {
|
|
123
|
+
"type": "boolean",
|
|
124
|
+
"default": false,
|
|
125
|
+
"description": "Do not add dependencies to `package.json`.",
|
|
126
|
+
"x-priority": "internal"
|
|
127
127
|
}
|
|
128
128
|
},
|
|
129
|
-
"required": []
|
|
129
|
+
"required": [],
|
|
130
|
+
"examplesFile": "../../../docs/application-examples.md"
|
|
130
131
|
}
|
|
@@ -6,6 +6,8 @@ interface Schema {
|
|
|
6
6
|
style: SupportedStyles;
|
|
7
7
|
directory?: string;
|
|
8
8
|
flat?: boolean;
|
|
9
|
+
pascalCaseFiles?: boolean;
|
|
10
|
+
pascalCaseDirectory?: boolean;
|
|
9
11
|
}
|
|
10
12
|
export declare function componentGenerator(host: Tree, options: Schema): Promise<import("@nrwl/devkit").GeneratorCallback>;
|
|
11
13
|
export default componentGenerator;
|
|
@@ -4,7 +4,6 @@ exports.componentSchematic = exports.componentGenerator = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nrwl/devkit");
|
|
6
6
|
const react_1 = require("@nrwl/react");
|
|
7
|
-
const run_tasks_in_serial_1 = require("@nrwl/workspace/src/utilities/run-tasks-in-serial");
|
|
8
7
|
const styles_1 = require("../../utils/styles");
|
|
9
8
|
function getDirectory(host, options) {
|
|
10
9
|
const workspace = (0, devkit_1.getProjects)(host);
|
|
@@ -21,9 +20,9 @@ function getDirectory(host, options) {
|
|
|
21
20
|
*/
|
|
22
21
|
function componentGenerator(host, options) {
|
|
23
22
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
24
|
-
const componentInstall = yield (0, react_1.componentGenerator)(host, Object.assign(Object.assign({}, options), { directory: getDirectory(host, options),
|
|
23
|
+
const componentInstall = yield (0, react_1.componentGenerator)(host, Object.assign(Object.assign({}, options), { directory: getDirectory(host, options), classComponent: false, routing: false }));
|
|
25
24
|
const styledInstall = (0, styles_1.addStyleDependencies)(host, options.style);
|
|
26
|
-
return (0,
|
|
25
|
+
return (0, devkit_1.runTasksInSerial)(styledInstall, componentInstall);
|
|
27
26
|
});
|
|
28
27
|
}
|
|
29
28
|
exports.componentGenerator = componentGenerator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../../../packages/next/src/generators/component/component.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../../../packages/next/src/generators/component/component.ts"],"names":[],"mappings":";;;;AAAA,yCAKsB;AAEtB,uCAA4E;AAE5E,+CAA0D;AAY1D,SAAS,YAAY,CAAC,IAAU,EAAE,OAAe;IAC/C,MAAM,SAAS,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IACpC,MAAM,WAAW,GAAG,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC;IAE/D,OAAO,OAAO,CAAC,SAAS;QACtB,CAAC,CAAC,OAAO,CAAC,SAAS;QACnB,CAAC,CAAC,WAAW,KAAK,aAAa;YAC/B,CAAC,CAAC,YAAY;YACd,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAED;;;GAGG;AACH,SAAsB,kBAAkB,CAAC,IAAU,EAAE,OAAe;;QAClE,MAAM,gBAAgB,GAAG,MAAM,IAAA,0BAAuB,EAAC,IAAI,kCACtD,OAAO,KACV,SAAS,EAAE,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,EACtC,cAAc,EAAE,KAAK,EACrB,OAAO,EAAE,KAAK,IACd,CAAC;QAEH,MAAM,aAAa,GAAG,IAAA,6BAAoB,EAAC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;QAEhE,OAAO,IAAA,yBAAgB,EAAC,aAAa,EAAE,gBAAgB,CAAC,CAAC;IAC3D,CAAC;CAAA;AAXD,gDAWC;AAED,kBAAe,kBAAkB,CAAC;AACrB,QAAA,kBAAkB,GAAG,IAAA,2BAAkB,EAAC,kBAAkB,CAAC,CAAC"}
|
|
@@ -5,16 +5,6 @@
|
|
|
5
5
|
"title": "Create a React Component for Next",
|
|
6
6
|
"description": "Create a React Component for Next.",
|
|
7
7
|
"type": "object",
|
|
8
|
-
"examples": [
|
|
9
|
-
{
|
|
10
|
-
"command": "nx g component my-component --project=mylib",
|
|
11
|
-
"description": "Generate a component in the `mylib` library"
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"command": "nx g component my-component --project=mylib --classComponent",
|
|
15
|
-
"description": "Generate a class component in the `mylib` library"
|
|
16
|
-
}
|
|
17
|
-
],
|
|
18
8
|
"properties": {
|
|
19
9
|
"project": {
|
|
20
10
|
"type": "string",
|
|
@@ -23,7 +13,8 @@
|
|
|
23
13
|
"$default": {
|
|
24
14
|
"$source": "projectName"
|
|
25
15
|
},
|
|
26
|
-
"x-prompt": "What is the name of the project for this component?"
|
|
16
|
+
"x-prompt": "What is the name of the project for this component?",
|
|
17
|
+
"x-priority": "important"
|
|
27
18
|
},
|
|
28
19
|
"name": {
|
|
29
20
|
"type": "string",
|
|
@@ -32,7 +23,8 @@
|
|
|
32
23
|
"$source": "argv",
|
|
33
24
|
"index": 0
|
|
34
25
|
},
|
|
35
|
-
"x-prompt": "What name would you like to use for the component?"
|
|
26
|
+
"x-prompt": "What name would you like to use for the component?",
|
|
27
|
+
"x-priority": "important"
|
|
36
28
|
},
|
|
37
29
|
"style": {
|
|
38
30
|
"description": "The file extension to be used for style files.",
|
|
@@ -74,12 +66,14 @@
|
|
|
74
66
|
"skipTests": {
|
|
75
67
|
"type": "boolean",
|
|
76
68
|
"description": "When true, does not create `spec.ts` test files for the new component.",
|
|
77
|
-
"default": false
|
|
69
|
+
"default": false,
|
|
70
|
+
"x-priority": "internal"
|
|
78
71
|
},
|
|
79
72
|
"directory": {
|
|
80
73
|
"type": "string",
|
|
81
74
|
"description": "Create the component under this directory (can be nested).",
|
|
82
|
-
"alias": "dir"
|
|
75
|
+
"alias": "dir",
|
|
76
|
+
"x-priority": "important"
|
|
83
77
|
},
|
|
84
78
|
"export": {
|
|
85
79
|
"type": "boolean",
|
|
@@ -96,7 +90,20 @@
|
|
|
96
90
|
"type": "boolean",
|
|
97
91
|
"description": "Create component at the source root rather than its own directory.",
|
|
98
92
|
"default": false
|
|
93
|
+
},
|
|
94
|
+
"pascalCaseFiles": {
|
|
95
|
+
"type": "boolean",
|
|
96
|
+
"description": "Use pascal case component file name (e.g. `App.tsx`).",
|
|
97
|
+
"alias": "P",
|
|
98
|
+
"default": false
|
|
99
|
+
},
|
|
100
|
+
"pascalCaseDirectory": {
|
|
101
|
+
"type": "boolean",
|
|
102
|
+
"description": "Use pascal case directory name (e.g. `App/App.tsx`).",
|
|
103
|
+
"alias": "R",
|
|
104
|
+
"default": false
|
|
99
105
|
}
|
|
100
106
|
},
|
|
101
|
-
"required": ["name", "project"]
|
|
107
|
+
"required": ["name", "project"],
|
|
108
|
+
"examplesFile": "../../../docs/component-examples.md"
|
|
102
109
|
}
|
|
@@ -4,12 +4,6 @@
|
|
|
4
4
|
"$id": "NxNextCustomServer",
|
|
5
5
|
"title": "Add custom server",
|
|
6
6
|
"description": "Add a custom server to existing Next.js application.",
|
|
7
|
-
"examples": [
|
|
8
|
-
{
|
|
9
|
-
"command": "nx g custom-server my-app",
|
|
10
|
-
"description": "Add a custom server to existing Next.js app."
|
|
11
|
-
}
|
|
12
|
-
],
|
|
13
7
|
"type": "object",
|
|
14
8
|
"properties": {
|
|
15
9
|
"project": {
|
|
@@ -21,7 +15,8 @@
|
|
|
21
15
|
"index": 0
|
|
22
16
|
},
|
|
23
17
|
"x-dropdown": "project",
|
|
24
|
-
"x-prompt": "What is the name of the project to set up a custom server for?"
|
|
18
|
+
"x-prompt": "What is the name of the project to set up a custom server for?",
|
|
19
|
+
"x-priority": "important"
|
|
25
20
|
},
|
|
26
21
|
"compiler": {
|
|
27
22
|
"type": "string",
|
|
@@ -30,5 +25,6 @@
|
|
|
30
25
|
"description": "The compiler used to build the custom server."
|
|
31
26
|
}
|
|
32
27
|
},
|
|
33
|
-
"required": ["project"]
|
|
28
|
+
"required": ["project"],
|
|
29
|
+
"examplesFile": "../../../docs/custom-server-examples.md"
|
|
34
30
|
}
|
|
@@ -3,40 +3,44 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.nextInitSchematic = exports.nextInitGenerator = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nrwl/devkit");
|
|
6
|
-
const run_tasks_in_serial_1 = require("@nrwl/workspace/src/utilities/run-tasks-in-serial");
|
|
7
6
|
const jest_1 = require("@nrwl/jest");
|
|
8
7
|
const cypress_1 = require("@nrwl/cypress");
|
|
9
|
-
const
|
|
10
|
-
const
|
|
8
|
+
const versions_1 = require("@nrwl/react/src/utils/versions");
|
|
9
|
+
const init_1 = require("@nrwl/react/src/generators/init/init");
|
|
10
|
+
const js_1 = require("@nrwl/js");
|
|
11
|
+
const versions_2 = require("../../utils/versions");
|
|
11
12
|
const add_gitignore_entry_1 = require("../../utils/add-gitignore-entry");
|
|
12
13
|
function updateDependencies(host) {
|
|
13
14
|
return (0, devkit_1.addDependenciesToPackageJson)(host, {
|
|
14
|
-
'@nrwl/next':
|
|
15
|
-
next:
|
|
16
|
-
react:
|
|
17
|
-
'react-dom':
|
|
18
|
-
tslib:
|
|
15
|
+
'@nrwl/next': versions_2.nxVersion,
|
|
16
|
+
next: versions_2.nextVersion,
|
|
17
|
+
react: versions_1.reactVersion,
|
|
18
|
+
'react-dom': versions_1.reactDomVersion,
|
|
19
|
+
tslib: versions_2.tsLibVersion,
|
|
19
20
|
}, {
|
|
20
|
-
'eslint-config-next':
|
|
21
|
+
'eslint-config-next': versions_2.eslintConfigNextVersion,
|
|
21
22
|
});
|
|
22
23
|
}
|
|
23
24
|
function nextInitGenerator(host, schema) {
|
|
24
25
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
25
26
|
const tasks = [];
|
|
27
|
+
tasks.push(yield (0, js_1.initGenerator)(host, Object.assign(Object.assign({}, schema), { skipFormat: true })));
|
|
26
28
|
if (!schema.unitTestRunner || schema.unitTestRunner === 'jest') {
|
|
27
|
-
const jestTask = (0, jest_1.jestInitGenerator)(host, schema);
|
|
29
|
+
const jestTask = yield (0, jest_1.jestInitGenerator)(host, schema);
|
|
28
30
|
tasks.push(jestTask);
|
|
29
31
|
}
|
|
30
32
|
if (!schema.e2eTestRunner || schema.e2eTestRunner === 'cypress') {
|
|
31
|
-
const cypressTask = (0, cypress_1.cypressInitGenerator)(host, {});
|
|
33
|
+
const cypressTask = yield (0, cypress_1.cypressInitGenerator)(host, {});
|
|
32
34
|
tasks.push(cypressTask);
|
|
33
35
|
}
|
|
34
|
-
const reactTask = yield (0,
|
|
36
|
+
const reactTask = yield (0, init_1.default)(host, schema);
|
|
35
37
|
tasks.push(reactTask);
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
if (!schema.skipPackageJson) {
|
|
39
|
+
const installTask = updateDependencies(host);
|
|
40
|
+
tasks.push(installTask);
|
|
41
|
+
}
|
|
38
42
|
(0, add_gitignore_entry_1.addGitIgnoreEntry)(host);
|
|
39
|
-
return (0,
|
|
43
|
+
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
40
44
|
});
|
|
41
45
|
}
|
|
42
46
|
exports.nextInitGenerator = nextInitGenerator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../../../../packages/next/src/generators/init/init.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../../../../packages/next/src/generators/init/init.ts"],"names":[],"mappings":";;;;AAAA,yCAMsB;AAEtB,qCAA+C;AAC/C,2CAAqD;AACrD,6DAA+E;A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CAAC;SACzB;QAED,IAAA,uCAAiB,EAAC,IAAI,CAAC,CAAC;QAExB,OAAO,IAAA,yBAAgB,EAAC,GAAG,KAAK,CAAC,CAAC;IACpC,CAAC;CAAA;AA9BD,8CA8BC;AAED,kBAAe,iBAAiB,CAAC;AACpB,QAAA,iBAAiB,GAAG,IAAA,2BAAkB,EAAC,iBAAiB,CAAC,CAAC"}
|
|
@@ -27,6 +27,12 @@
|
|
|
27
27
|
"type": "boolean",
|
|
28
28
|
"default": false,
|
|
29
29
|
"description": "Use JavaScript instead of TypeScript"
|
|
30
|
+
},
|
|
31
|
+
"skipPackageJson": {
|
|
32
|
+
"type": "boolean",
|
|
33
|
+
"default": false,
|
|
34
|
+
"description": "Do not add dependencies to `package.json`.",
|
|
35
|
+
"x-priority": "internal"
|
|
30
36
|
}
|
|
31
37
|
},
|
|
32
38
|
"required": []
|
|
@@ -3,8 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.librarySchematic = exports.libraryGenerator = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nrwl/devkit");
|
|
6
|
-
const
|
|
7
|
-
const run_tasks_in_serial_1 = require("@nrwl/workspace/src/utilities/run-tasks-in-serial");
|
|
6
|
+
const library_1 = require("@nrwl/react/src/generators/library/library");
|
|
8
7
|
const init_1 = require("../init/init");
|
|
9
8
|
function libraryGenerator(host, options) {
|
|
10
9
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
@@ -17,7 +16,7 @@ function libraryGenerator(host, options) {
|
|
|
17
16
|
const projectRoot = (0, devkit_1.joinPathFragments)(libsDir, projectDirectory);
|
|
18
17
|
const initTask = yield (0, init_1.nextInitGenerator)(host, Object.assign(Object.assign({}, options), { skipFormat: true }));
|
|
19
18
|
tasks.push(initTask);
|
|
20
|
-
const libTask = yield (0,
|
|
19
|
+
const libTask = yield (0, library_1.libraryGenerator)(host, Object.assign(Object.assign({}, options), { compiler: 'swc' }));
|
|
21
20
|
tasks.push(libTask);
|
|
22
21
|
(0, devkit_1.updateJson)(host, (0, devkit_1.joinPathFragments)(projectRoot, '.babelrc'), (json) => {
|
|
23
22
|
if (options.style === '@emotion/styled') {
|
|
@@ -62,7 +61,7 @@ function libraryGenerator(host, options) {
|
|
|
62
61
|
});
|
|
63
62
|
return json;
|
|
64
63
|
});
|
|
65
|
-
return (0,
|
|
64
|
+
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
66
65
|
});
|
|
67
66
|
}
|
|
68
67
|
exports.libraryGenerator = libraryGenerator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"library.js","sourceRoot":"","sources":["../../../../../../packages/next/src/generators/library/library.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"library.js","sourceRoot":"","sources":["../../../../../../packages/next/src/generators/library/library.ts"],"names":[],"mappings":";;;;AAAA,yCASsB;AACtB,wEAAuG;AAEvG,uCAAiD;AAGjD,SAAsB,gBAAgB,CAAC,IAAU,EAAE,OAAe;;QAChE,MAAM,IAAI,GAAG,IAAA,cAAK,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC;QAC1C,MAAM,KAAK,GAAwB,EAAE,CAAC;QACtC,MAAM,gBAAgB,GAAG,OAAO,CAAC,SAAS;YACxC,CAAC,CAAC,GAAG,IAAA,cAAK,EAAC,OAAO,CAAC,SAAS,CAAC,CAAC,QAAQ,IAAI,IAAI,EAAE;YAChD,CAAC,CAAC,IAAI,CAAC;QAET,MAAM,EAAE,OAAO,EAAE,GAAG,IAAA,2BAAkB,EAAC,IAAI,CAAC,CAAC;QAC7C,MAAM,WAAW,GAAG,IAAA,0BAAiB,EAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;QACjE,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAiB,EAAC,IAAI,kCACxC,OAAO,KACV,UAAU,EAAE,IAAI,IAChB,CAAC;QACH,KAAK,CAAC,I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,IAAA,0BAAiB,EAAC,WAAW,EAAE,mBAAmB,CAAC,EACnD,CAAC,IAAI,EAAE,EAAE;YACP,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;gBACf,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;aACjB;YACD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAY,EAAE,EAAE;gBAC3C,IAAI,IAAI,CAAC,QAAQ,CAAC,0BAA0B,CAAC,EAAE;oBAC7C,OAAO,IAAI,CAAC,OAAO,CACjB,gCAAgC,EAChC,+BAA+B,CAChC,CAAC;iBACH;gBACD,OAAO,IAAI,CAAC;YACd,CAAC,CAAC,CAAC;YACH,OAAO,IAAI,CAAC;QACd,CAAC,CACF,CAAC;QAEF,OAAO,IAAA,yBAAgB,EAAC,GAAG,KAAK,CAAC,CAAC;IACpC,CAAC;CAAA;AA3ED,4CA2EC;AAED,kBAAe,gBAAgB,CAAC;AACnB,QAAA,gBAAgB,GAAG,IAAA,2BAAkB,EAAC,gBAAgB,CAAC,CAAC"}
|
|
@@ -5,16 +5,6 @@
|
|
|
5
5
|
"title": "Create a React Library for Nx",
|
|
6
6
|
"description": "Create a React Library for an Nx workspace.",
|
|
7
7
|
"type": "object",
|
|
8
|
-
"examples": [
|
|
9
|
-
{
|
|
10
|
-
"command": "nx g lib mylib --directory=myapp",
|
|
11
|
-
"description": "Generate `libs/myapp/mylib`"
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"command": "nx g lib mylib --appProject=myapp",
|
|
15
|
-
"description": "Generate a library with routes and add them to `myapp`"
|
|
16
|
-
}
|
|
17
|
-
],
|
|
18
8
|
"properties": {
|
|
19
9
|
"name": {
|
|
20
10
|
"type": "string",
|
|
@@ -24,12 +14,14 @@
|
|
|
24
14
|
"index": 0
|
|
25
15
|
},
|
|
26
16
|
"x-prompt": "What name would you like to use for the library?",
|
|
27
|
-
"pattern": "^[a-zA-Z].*$"
|
|
17
|
+
"pattern": "^[a-zA-Z].*$",
|
|
18
|
+
"x-priority": "important"
|
|
28
19
|
},
|
|
29
20
|
"directory": {
|
|
30
21
|
"type": "string",
|
|
31
22
|
"description": "A directory where the lib is placed.",
|
|
32
|
-
"alias": "dir"
|
|
23
|
+
"alias": "dir",
|
|
24
|
+
"x-priority": "important"
|
|
33
25
|
},
|
|
34
26
|
"style": {
|
|
35
27
|
"description": "The file extension to be used for style files.",
|
|
@@ -75,7 +67,7 @@
|
|
|
75
67
|
"linter": {
|
|
76
68
|
"description": "The tool to use for running lint checks.",
|
|
77
69
|
"type": "string",
|
|
78
|
-
"enum": ["eslint"
|
|
70
|
+
"enum": ["eslint"],
|
|
79
71
|
"default": "eslint"
|
|
80
72
|
},
|
|
81
73
|
"unitTestRunner": {
|
|
@@ -154,8 +146,17 @@
|
|
|
154
146
|
},
|
|
155
147
|
"standaloneConfig": {
|
|
156
148
|
"description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json`",
|
|
157
|
-
"type": "boolean"
|
|
149
|
+
"type": "boolean",
|
|
150
|
+
"default": true,
|
|
151
|
+
"x-deprecated": "Nx only supports standaloneConfig"
|
|
152
|
+
},
|
|
153
|
+
"skipPackageJson": {
|
|
154
|
+
"type": "boolean",
|
|
155
|
+
"default": false,
|
|
156
|
+
"description": "Do not add dependencies to `package.json`.",
|
|
157
|
+
"x-priority": "internal"
|
|
158
158
|
}
|
|
159
159
|
},
|
|
160
|
-
"required": ["name"]
|
|
160
|
+
"required": ["name"],
|
|
161
|
+
"examplesFile": "../../../docs/library-examples.md"
|
|
161
162
|
}
|
|
@@ -5,7 +5,6 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const react_1 = require("@nrwl/react");
|
|
6
6
|
const devkit_1 = require("@nrwl/devkit");
|
|
7
7
|
const styles_1 = require("../../utils/styles");
|
|
8
|
-
const run_tasks_in_serial_1 = require("@nrwl/workspace/src/utilities/run-tasks-in-serial");
|
|
9
8
|
/*
|
|
10
9
|
* This schematic is basically the React component one, but for Next we need
|
|
11
10
|
* extra dependencies for css, sass, less, styl style options, and make sure
|
|
@@ -16,7 +15,7 @@ function pageGenerator(host, options) {
|
|
|
16
15
|
const directory = options.directory ? `pages/${options.directory}` : 'pages';
|
|
17
16
|
const componentTask = yield (0, react_1.componentGenerator)(host, Object.assign(Object.assign({}, options), { directory, pascalCaseFiles: false, export: false, classComponent: false, routing: false, skipTests: !options.withTests, flat: !!options.flat, fileName: !options.flat ? 'index' : undefined }));
|
|
18
17
|
const styledTask = (0, styles_1.addStyleDependencies)(host, options.style);
|
|
19
|
-
return (0,
|
|
18
|
+
return (0, devkit_1.runTasksInSerial)(componentTask, styledTask);
|
|
20
19
|
});
|
|
21
20
|
}
|
|
22
21
|
exports.pageGenerator = pageGenerator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../../../../../packages/next/src/generators/page/page.ts"],"names":[],"mappings":";;;;AAAA,uCAA4E;AAC5E,
|
|
1
|
+
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../../../../../packages/next/src/generators/page/page.ts"],"names":[],"mappings":";;;;AAAA,uCAA4E;AAC5E,yCAA0E;AAE1E,+CAA0D;AAG1D;;;;GAIG;AACH,SAAsB,aAAa,CAAC,IAAU,EAAE,OAAe;;QAC7D,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;QAC7E,MAAM,aAAa,GAAG,MAAM,IAAA,0BAAuB,EAAC,IAAI,kCACnD,OAAO,KACV,SAAS,EACT,eAAe,EAAE,KAAK,EACtB,MAAM,EAAE,KAAK,EACb,cAAc,EAAE,KAAK,EACrB,OAAO,EAAE,KAAK,EACd,SAAS,EAAE,CAAC,OAAO,CAAC,SAAS,EAC7B,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,EACpB,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,IAC7C,CAAC;QAEH,MAAM,UAAU,GAAG,IAAA,6BAAoB,EAAC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;QAE7D,OAAO,IAAA,yBAAgB,EAAC,aAAa,EAAE,UAAU,CAAC,CAAC;IACrD,CAAC;CAAA;AAjBD,sCAiBC;AAED,kBAAe,aAAa,CAAC;AAChB,QAAA,aAAa,GAAG,IAAA,2BAAkB,EAAC,aAAa,CAAC,CAAC"}
|
|
@@ -5,12 +5,6 @@
|
|
|
5
5
|
"title": "Create a Page for Next",
|
|
6
6
|
"description": "Create a Page for Next.",
|
|
7
7
|
"type": "object",
|
|
8
|
-
"examples": [
|
|
9
|
-
{
|
|
10
|
-
"command": "nx g page my-new-page --project=my-app",
|
|
11
|
-
"description": "Generate a page in the my-app application"
|
|
12
|
-
}
|
|
13
|
-
],
|
|
14
8
|
"properties": {
|
|
15
9
|
"project": {
|
|
16
10
|
"type": "string",
|
|
@@ -19,7 +13,8 @@
|
|
|
19
13
|
"$default": {
|
|
20
14
|
"$source": "projectName"
|
|
21
15
|
},
|
|
22
|
-
"x-prompt": "What is the name of the project for this component?"
|
|
16
|
+
"x-prompt": "What is the name of the project for this component?",
|
|
17
|
+
"x-priority": "important"
|
|
23
18
|
},
|
|
24
19
|
"name": {
|
|
25
20
|
"type": "string",
|
|
@@ -28,12 +23,14 @@
|
|
|
28
23
|
"$source": "argv",
|
|
29
24
|
"index": 0
|
|
30
25
|
},
|
|
31
|
-
"x-prompt": "What name would you like to use for the component?"
|
|
26
|
+
"x-prompt": "What name would you like to use for the component?",
|
|
27
|
+
"x-priority": "important"
|
|
32
28
|
},
|
|
33
29
|
"directory": {
|
|
34
30
|
"type": "string",
|
|
35
31
|
"description": "Create the page under this directory (can be nested). Will be created under `pages/`.",
|
|
36
|
-
"alias": "dir"
|
|
32
|
+
"alias": "dir",
|
|
33
|
+
"x-priority": "important"
|
|
37
34
|
},
|
|
38
35
|
"style": {
|
|
39
36
|
"description": "The file extension to be used for style files.",
|
|
@@ -74,7 +71,8 @@
|
|
|
74
71
|
"label": "None"
|
|
75
72
|
}
|
|
76
73
|
]
|
|
77
|
-
}
|
|
74
|
+
},
|
|
75
|
+
"x-priority": "important"
|
|
78
76
|
},
|
|
79
77
|
"withTests": {
|
|
80
78
|
"type": "boolean",
|
|
@@ -98,5 +96,6 @@
|
|
|
98
96
|
"default": false
|
|
99
97
|
}
|
|
100
98
|
},
|
|
101
|
-
"required": ["name", "project"]
|
|
99
|
+
"required": ["name", "project"],
|
|
100
|
+
"examplesFile": "../../../docs/page-examples.md"
|
|
102
101
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { DependentBuildableProjectNode } from '@nrwl/
|
|
1
|
+
import { DependentBuildableProjectNode } from '@nrwl/js/src/utils/buildable-libs-utils';
|
|
2
2
|
import { ExecutorContext } from '@nrwl/devkit';
|
|
3
3
|
export declare function assertDependentProjectsHaveBeenBuilt(dependencies: DependentBuildableProjectNode[], context: ExecutorContext): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.assertDependentProjectsHaveBeenBuilt = void 0;
|
|
4
|
-
const buildable_libs_utils_1 = require("@nrwl/
|
|
4
|
+
const buildable_libs_utils_1 = require("@nrwl/js/src/utils/buildable-libs-utils");
|
|
5
5
|
const chalk = require("chalk");
|
|
6
6
|
const devkit_1 = require("@nrwl/devkit");
|
|
7
7
|
function assertDependentProjectsHaveBeenBuilt(dependencies, context) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildable-libs.js","sourceRoot":"","sources":["../../../../../packages/next/src/utils/buildable-libs.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"buildable-libs.js","sourceRoot":"","sources":["../../../../../packages/next/src/utils/buildable-libs.ts"],"names":[],"mappings":";;;AAAA,kFAGiD;AACjD,+BAA+B;AAC/B,yCAA6D;AAE7D,SAAgB,oCAAoC,CAClD,YAA6C,EAC7C,OAAwB;IAExB,MAAM,OAAO,GAAG,IAAA,mDAA4B,EAC1C,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,WAAW,EACnB,OAAO,CAAC,UAAU,EAClB,YAAY,CACb,CAAC;IACF,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;QACtB,MAAM,IAAI,KAAK,CACb,KAAK,CAAC,GAAG,CAAC,IAAA,qBAAY,EAAA;4BAEpB,OAAO,CAAC,WACV;;;QAGE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;KACrD,CAAC,CACD,CAAC;KACH;AACH,CAAC;AAtBD,oFAsBC"}
|
package/src/utils/config.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ import { ExecutorContext } from '@nrwl/devkit';
|
|
|
2
2
|
import type { PHASE_DEVELOPMENT_SERVER, PHASE_EXPORT, PHASE_PRODUCTION_BUILD, PHASE_PRODUCTION_SERVER } from 'next/dist/shared/lib/constants';
|
|
3
3
|
import { Configuration } from 'webpack';
|
|
4
4
|
import { FileReplacement, NextBuildBuilderOptions } from './types';
|
|
5
|
-
import { DependentBuildableProjectNode } from '@nrwl/
|
|
5
|
+
import { DependentBuildableProjectNode } from '@nrwl/js/src/utils/buildable-libs-utils';
|
|
6
6
|
export declare function createWebpackConfig(workspaceRoot: string, projectRoot: string, fileReplacements?: FileReplacement[], assets?: any, dependencies?: DependentBuildableProjectNode[], libsDir?: string): (a: any, b: any) => Configuration;
|
|
7
7
|
export declare function prepareConfig(phase: typeof PHASE_PRODUCTION_BUILD | typeof PHASE_EXPORT | typeof PHASE_DEVELOPMENT_SERVER | typeof PHASE_PRODUCTION_SERVER, options: NextBuildBuilderOptions, context: ExecutorContext, dependencies: DependentBuildableProjectNode[], libsDir: string): Promise<any>;
|
package/src/utils/config.js
CHANGED
|
@@ -6,7 +6,7 @@ const devkit_1 = require("@nrwl/devkit");
|
|
|
6
6
|
const path_1 = require("path");
|
|
7
7
|
const tsconfig_paths_webpack_plugin_1 = require("tsconfig-paths-webpack-plugin");
|
|
8
8
|
const webpack_1 = require("@nrwl/webpack");
|
|
9
|
-
const buildable_libs_utils_1 = require("@nrwl/
|
|
9
|
+
const buildable_libs_utils_1 = require("@nrwl/js/src/utils/buildable-libs-utils");
|
|
10
10
|
const loadConfig = require('next/dist/server/config').default;
|
|
11
11
|
function createWebpackConfig(workspaceRoot, projectRoot, fileReplacements = [], assets = null, dependencies = [], libsDir = '') {
|
|
12
12
|
return function webpackConfig(config, { isServer, defaultLoaders, }) {
|
package/src/utils/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../../packages/next/src/utils/config.ts"],"names":[],"mappings":";;;;AAAA,yCAIsB;AAWtB,+BAAqC;AACrC,iFAAoE;AAGpE,2CAAkE;AAElE,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../../packages/next/src/utils/config.ts"],"names":[],"mappings":";;;;AAAA,yCAIsB;AAWtB,+BAAqC;AACrC,iFAAoE;AAGpE,2CAAkE;AAElE,kFAGiD;AAEjD,MAAM,UAAU,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC,OAAO,CAAC;AAE9D,SAAgB,mBAAmB,CACjC,aAAqB,EACrB,WAAmB,EACnB,mBAAsC,EAAE,EACxC,SAAc,IAAI,EAClB,eAAgD,EAAE,EAClD,OAAO,GAAG,EAAE;IAEZ,OAAO,SAAS,aAAa,CAC3B,MAAqB,EACrB,EACE,QAAQ,EACR,cAAc,GAMf;QAED,MAAM,UAAU,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;QAChD,M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OAAO,CAAC,MAAM,EACd,YAAY,EACZ,OAAO,CACR,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAE5C,IAAI,OAAO,cAAc,KAAK,UAAU,EAAE;YACxC,MAAM,IAAI,KAAK,CACb,iJAAiJ,CAClJ,CAAC;SACH;QAED,OAAO,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;IACpD,CAAC;CAAA;AAvCD,sCAuCC;AAED,SAAS,iBAAiB,CACxB,UAA8B,EAC9B,aAAqB;IAErB,IAAI,CAAC,UAAU,EAAE;QACf,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;KACpB;IAED,IAAI,QAAgB,CAAC;IAErB,IAAI;QACF,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;KACxC;IAAC,WAAM;QACN,QAAQ,GAAG,IAAA,WAAI,EAAC,aAAa,EAAE,UAAU,CAAC,CAAC;KAC5C;IAED,IAAI;QACF,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;KAC1B;IAAC,WAAM;QACN,MAAM,IAAI,KAAK,CACb,yDAAyD,QAAQ,EAAE,CACpE,CAAC;KACH;AACH,CAAC"}
|
package/src/utils/styles.js
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.addStyleDependencies = exports.NEXT_SPECIFIC_STYLE_DEPENDENCIES = void 0;
|
|
4
4
|
const devkit_1 = require("@nrwl/devkit");
|
|
5
|
-
const
|
|
5
|
+
const styled_1 = require("@nrwl/react/src/utils/styled");
|
|
6
6
|
const versions_1 = require("./versions");
|
|
7
7
|
exports.NEXT_SPECIFIC_STYLE_DEPENDENCIES = {
|
|
8
8
|
'styled-components': {
|
|
9
|
-
dependencies:
|
|
10
|
-
devDependencies: Object.assign(Object.assign({},
|
|
9
|
+
dependencies: styled_1.CSS_IN_JS_DEPENDENCIES['styled-components'].dependencies,
|
|
10
|
+
devDependencies: Object.assign(Object.assign({}, styled_1.CSS_IN_JS_DEPENDENCIES['styled-components'].devDependencies), { 'babel-plugin-styled-components': versions_1.babelPluginStyledComponentsVersion }),
|
|
11
11
|
},
|
|
12
12
|
'@emotion/styled': {
|
|
13
|
-
dependencies: Object.assign(Object.assign({},
|
|
14
|
-
devDependencies:
|
|
13
|
+
dependencies: Object.assign(Object.assign({}, styled_1.CSS_IN_JS_DEPENDENCIES['@emotion/styled'].dependencies), { '@emotion/server': versions_1.emotionServerVersion }),
|
|
14
|
+
devDependencies: styled_1.CSS_IN_JS_DEPENDENCIES['@emotion/styled'].devDependencies,
|
|
15
15
|
},
|
|
16
16
|
css: {
|
|
17
17
|
dependencies: {},
|
package/src/utils/styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../packages/next/src/utils/styles.ts"],"names":[],"mappings":";;;AAAA,yCAKsB;AAEtB,
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../packages/next/src/utils/styles.ts"],"names":[],"mappings":";;;AAAA,yCAKsB;AAEtB,yDAAsE;AACtE,yCAMoB;AAEP,QAAA,gCAAgC,GAAG;IAC9C,mBAAmB,EAAE;QACnB,YAAY,EAAE,+BAAsB,CAAC,mBAAmB,CAAC,CAAC,YAAY;QACtE,eAAe,kCACV,+BAAsB,CAAC,mBAAmB,CAAC,CAAC,eAAe,KAC9D,gCAAgC,EAAE,6CAAkC,GACrE;KACF;IACD,iBAAiB,EAAE;QACjB,YAAY,kCACP,+BAAsB,CAAC,iBAAiB,CAAC,CAAC,YAAY,KACzD,iBAAiB,EAAE,+BAAoB,GACxC;QACD,eAAe,EAAE,+BAAsB,CAAC,iBAAiB,CAAC,CAAC,eAAe;KAC3E;IACD,GAAG,EAAE;QACH,YAAY,EAAE,EAAE;QAChB,eAAe,EAAE,EAAE;KACpB;IACD,IAAI,EAAE;QACJ,YAAY,EAAE,EAAE;QAChB,eAAe,EAAE,EAAE,IAAI,EAAE,sBAAW,EAAE;KACvC;IACD,IAAI,EAAE;QACJ,YAAY,EAAE,EAAE;QAChB,eAAe,EAAE;YACf,aAAa,EAAE,qBAAU;SAC1B;KACF;IACD,IAAI,EAAE;QACJ,YAAY,EAAE;YACZ,eAAe,EAAE,uBAAY;SAC9B;QACD,eAAe,EAAE,EAAE;KACpB;CACF,CAAC;AAEF,SAAgB,oBAAoB,CAClC,IAAU,EACV,KAAa;IAEb,MAAM,iBAAiB,GAAG,wCAAgC,CAAC,KAAK,CAAC,CAAC;IAElE,IAAI,CAAC,iBAAiB;QAAE,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;IAExC,MAAM,WAAW,GAAG,IAAA,qCAA4B,EAC9C,IAAI,EACJ,iBAAiB,CAAC,YAAY,EAC9B,iBAAiB,CAAC,eAAe,CAClC,CAAC;IAEF,6EAA6E;IAC7E,oEAAoE;IACpE,IAAI,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,MAAM,CAAC,EAAE;QAC3E,IAAA,mBAAU,EAAC,IAAI,EAAE,cAAc,EAAE,CAAC,IAAI,EAAE,EAAE;YACxC,IAAI,CAAC,WAAW,mCAAQ,IAAI,CAAC,WAAW,KAAE,YAAY,EAAE,OAAO,GAAE,CAAC;YAClE,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;KACJ;IAED,OAAO,WAAW,CAAC;AACrB,CAAC;AAxBD,oDAwBC"}
|
package/src/utils/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type NextServer = (options: NextServerOptions, proxyConfig?: ProxyConfig) => Promise<void>;
|
|
2
2
|
export interface ProxyConfig {
|
|
3
3
|
[path: string]: {
|
|
4
4
|
target: string;
|
|
@@ -30,6 +30,7 @@ export interface NextBuildBuilderOptions {
|
|
|
30
30
|
nextConfig?: string;
|
|
31
31
|
buildLibsFromSource?: boolean;
|
|
32
32
|
includeDevDependenciesInPackageJson?: boolean;
|
|
33
|
+
generateLockfile?: boolean;
|
|
33
34
|
watch?: boolean;
|
|
34
35
|
}
|
|
35
36
|
export interface NextServeBuilderOptions {
|