@nx/web 0.0.0-pr-27957-a99d5ea → 0.0.0-pr-28229-afe192c
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/web",
|
|
3
|
-
"version": "0.0.0-pr-
|
|
3
|
+
"version": "0.0.0-pr-28229-afe192c",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Plugin for Web Components contains generators for managing Web Component applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Playwright, Cypress, and Storybook.\n\n- Scaffolding for creating buildable libraries that can be published to npm.\n\n- Utilities for automatic workspace refactoring.",
|
|
6
6
|
"repository": {
|
|
@@ -31,17 +31,16 @@
|
|
|
31
31
|
"migrations": "./migrations.json"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"chalk": "^4.1.0",
|
|
35
34
|
"detect-port": "^1.5.1",
|
|
36
35
|
"http-server": "^14.1.0",
|
|
36
|
+
"picocolors": "^1.1.0",
|
|
37
37
|
"tslib": "^2.3.0",
|
|
38
|
-
"@nx/devkit": "0.0.0-pr-
|
|
39
|
-
"@nx/js": "0.0.0-pr-
|
|
40
|
-
"@nrwl/web": "0.0.0-pr-27957-a99d5ea"
|
|
38
|
+
"@nx/devkit": "0.0.0-pr-28229-afe192c",
|
|
39
|
+
"@nx/js": "0.0.0-pr-28229-afe192c"
|
|
41
40
|
},
|
|
42
41
|
"publishConfig": {
|
|
43
42
|
"access": "public"
|
|
44
43
|
},
|
|
45
44
|
"type": "commonjs",
|
|
46
45
|
"types": "./index.d.ts"
|
|
47
|
-
}
|
|
46
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = fileServerExecutor;
|
|
4
4
|
const child_process_1 = require("child_process");
|
|
5
|
-
const
|
|
5
|
+
const pc = require("picocolors");
|
|
6
6
|
const devkit_1 = require("@nx/devkit");
|
|
7
7
|
const fs_1 = require("fs");
|
|
8
8
|
const os_1 = require("os");
|
|
@@ -138,7 +138,7 @@ async function* fileServerExecutor(options, context) {
|
|
|
138
138
|
});
|
|
139
139
|
}
|
|
140
140
|
catch {
|
|
141
|
-
throw new Error(`Build target failed: ${
|
|
141
|
+
throw new Error(`Build target failed: ${pc.bold(options.buildTarget)}`);
|
|
142
142
|
}
|
|
143
143
|
finally {
|
|
144
144
|
process.env.NX_SERVE_STATIC_BUILD_RUNNING = undefined;
|
|
@@ -156,7 +156,6 @@ function setDefaults(tree, options) {
|
|
|
156
156
|
async function applicationGenerator(host, schema) {
|
|
157
157
|
return await applicationGeneratorInternal(host, {
|
|
158
158
|
addPlugin: false,
|
|
159
|
-
projectNameAndRootFormat: 'derived',
|
|
160
159
|
...schema,
|
|
161
160
|
});
|
|
162
161
|
}
|
|
@@ -211,6 +210,7 @@ async function applicationGeneratorInternal(host, schema) {
|
|
|
211
210
|
inSourceTests: options.inSourceTests,
|
|
212
211
|
skipFormat: true,
|
|
213
212
|
addPlugin: options.addPlugin,
|
|
213
|
+
compiler: options.compiler,
|
|
214
214
|
});
|
|
215
215
|
tasks.push(vitestTask);
|
|
216
216
|
createOrEditViteConfig(host, {
|
|
@@ -390,14 +390,12 @@ async function applicationGeneratorInternal(host, schema) {
|
|
|
390
390
|
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
391
391
|
}
|
|
392
392
|
async function normalizeOptions(host, options) {
|
|
393
|
-
|
|
393
|
+
await (0, project_name_and_root_utils_1.ensureProjectName)(host, options, 'application');
|
|
394
|
+
const { projectName: appProjectName, projectRoot: appProjectRoot } = await (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(host, {
|
|
394
395
|
name: options.name,
|
|
395
396
|
projectType: 'application',
|
|
396
397
|
directory: options.directory,
|
|
397
|
-
projectNameAndRootFormat: options.projectNameAndRootFormat,
|
|
398
|
-
callingGenerator: '@nx/web:application',
|
|
399
398
|
});
|
|
400
|
-
options.projectNameAndRootFormat = projectNameAndRootFormat;
|
|
401
399
|
const nxJson = (0, devkit_1.readNxJson)(host);
|
|
402
400
|
const addPluginDefault = process.env.NX_ADD_PLUGINS !== 'false' &&
|
|
403
401
|
nxJson.useInferencePlugins !== false;
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils';
|
|
2
1
|
import type { Linter, LinterType } from '@nx/eslint';
|
|
3
2
|
|
|
4
3
|
export interface Schema {
|
|
5
|
-
|
|
4
|
+
directory: string;
|
|
5
|
+
name?: string;
|
|
6
6
|
prefix?: string;
|
|
7
7
|
style?: string;
|
|
8
8
|
bundler?: 'webpack' | 'none' | 'vite';
|
|
9
9
|
compiler?: 'babel' | 'swc';
|
|
10
10
|
skipFormat?: boolean;
|
|
11
|
-
directory?: string;
|
|
12
|
-
projectNameAndRootFormat?: ProjectNameAndRootFormat;
|
|
13
11
|
tags?: string;
|
|
14
12
|
unitTestRunner?: 'jest' | 'vitest' | 'none';
|
|
15
13
|
inSourceTests?: boolean;
|
|
@@ -6,24 +6,20 @@
|
|
|
6
6
|
"description": "Create a web application using `swc` or `babel` as compiler.",
|
|
7
7
|
"type": "object",
|
|
8
8
|
"properties": {
|
|
9
|
-
"
|
|
10
|
-
"description": "The
|
|
9
|
+
"directory": {
|
|
10
|
+
"description": "The directory of the new application.",
|
|
11
11
|
"type": "string",
|
|
12
12
|
"$default": {
|
|
13
13
|
"$source": "argv",
|
|
14
14
|
"index": 0
|
|
15
15
|
},
|
|
16
|
-
"x-prompt": "
|
|
17
|
-
"pattern": "^[a-zA-Z][^:]*$"
|
|
18
|
-
},
|
|
19
|
-
"directory": {
|
|
20
|
-
"description": "The directory of the new application.",
|
|
21
|
-
"type": "string"
|
|
16
|
+
"x-prompt": "Which directory do you want to create the application in?"
|
|
22
17
|
},
|
|
23
|
-
"
|
|
24
|
-
"description": "
|
|
18
|
+
"name": {
|
|
19
|
+
"description": "The name of the application.",
|
|
25
20
|
"type": "string",
|
|
26
|
-
"
|
|
21
|
+
"pattern": "^[a-zA-Z][^:]*$",
|
|
22
|
+
"x-priority": "important"
|
|
27
23
|
},
|
|
28
24
|
"style": {
|
|
29
25
|
"description": "The file extension to be used for style files.",
|
|
@@ -77,7 +73,8 @@
|
|
|
77
73
|
},
|
|
78
74
|
"unitTestRunner": {
|
|
79
75
|
"type": "string",
|
|
80
|
-
"enum": ["
|
|
76
|
+
"enum": ["vitest", "jest", "none"],
|
|
77
|
+
"default": "vitest",
|
|
81
78
|
"description": "Test runner to use for unit tests. Default value is 'jest' when using 'webpack' or 'none' as the bundler and 'vitest' when using 'vite' as the bundler"
|
|
82
79
|
},
|
|
83
80
|
"inSourceTests": {
|
|
@@ -113,6 +110,6 @@
|
|
|
113
110
|
"x-deprecated": "Nx only supports standaloneConfig"
|
|
114
111
|
}
|
|
115
112
|
},
|
|
116
|
-
"required": ["
|
|
113
|
+
"required": ["directory"],
|
|
117
114
|
"examplesFile": "../../../docs/application-examples.md"
|
|
118
115
|
}
|