@nx/web 17.1.1 → 17.2.0-beta.0
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": "17.
|
|
3
|
+
"version": "17.2.0-beta.0",
|
|
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, 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": {
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"detect-port": "^1.5.1",
|
|
35
35
|
"http-server": "^14.1.0",
|
|
36
36
|
"tslib": "^2.3.0",
|
|
37
|
-
"@nx/devkit": "17.
|
|
38
|
-
"@nx/js": "17.
|
|
39
|
-
"@nrwl/web": "17.
|
|
37
|
+
"@nx/devkit": "17.2.0-beta.0",
|
|
38
|
+
"@nx/js": "17.2.0-beta.0",
|
|
39
|
+
"@nrwl/web": "17.2.0-beta.0"
|
|
40
40
|
},
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
@@ -91,31 +91,39 @@ function createFileWatcher(project, changeHandler) {
|
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
93
|
async function* fileServerExecutor(options, context) {
|
|
94
|
+
if (!options.buildTarget && !options.staticFilePath) {
|
|
95
|
+
throw new Error("You must set either 'buildTarget' or 'staticFilePath'.");
|
|
96
|
+
}
|
|
97
|
+
if (options.watch && !options.buildTarget) {
|
|
98
|
+
throw new Error("Watch error: You can only specify 'watch' when 'buildTarget' is set.");
|
|
99
|
+
}
|
|
94
100
|
let running = false;
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
101
|
+
let disposeWatch;
|
|
102
|
+
if (options.buildTarget) {
|
|
103
|
+
const run = () => {
|
|
104
|
+
if (!running) {
|
|
105
|
+
running = true;
|
|
106
|
+
try {
|
|
107
|
+
const args = getBuildTargetCommand(options);
|
|
108
|
+
(0, child_process_1.execFileSync)(pmCmd, args, {
|
|
109
|
+
stdio: [0, 1, 2],
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
catch {
|
|
113
|
+
throw new Error(`Build target failed: ${chalk.bold(options.buildTarget)}`);
|
|
114
|
+
}
|
|
115
|
+
finally {
|
|
116
|
+
running = false;
|
|
117
|
+
}
|
|
109
118
|
}
|
|
119
|
+
};
|
|
120
|
+
if (options.watch) {
|
|
121
|
+
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
122
|
+
disposeWatch = await createFileWatcher(context.projectName, run);
|
|
110
123
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
if (options.watch) {
|
|
114
|
-
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
115
|
-
disposeWatch = await createFileWatcher(context.projectName, run);
|
|
124
|
+
// perform initial run
|
|
125
|
+
run();
|
|
116
126
|
}
|
|
117
|
-
// perform initial run
|
|
118
|
-
run();
|
|
119
127
|
const outputPath = getBuildTargetOutputPath(options, context);
|
|
120
128
|
if (options.spa) {
|
|
121
129
|
const src = (0, path_1.join)(outputPath, 'index.html');
|
|
@@ -156,7 +156,7 @@ async function applicationGeneratorInternal(host, schema) {
|
|
|
156
156
|
const vitestTask = await vitestGenerator(host, {
|
|
157
157
|
uiFramework: 'none',
|
|
158
158
|
project: options.projectName,
|
|
159
|
-
coverageProvider: '
|
|
159
|
+
coverageProvider: 'v8',
|
|
160
160
|
inSourceTests: options.inSourceTests,
|
|
161
161
|
skipFormat: true,
|
|
162
162
|
});
|