create-nx-workspace 20.1.0-canary.20241109-77d6704 → 20.2.0-canary.20241112-c21b039
Sign up to get free protection for your applications and to get access to all the features.
@@ -13,7 +13,6 @@ const decorator_1 = require("./decorator");
|
|
13
13
|
const get_third_party_preset_1 = require("../src/utils/preset/get-third-party-preset");
|
14
14
|
const prompts_1 = require("../src/internal-utils/prompts");
|
15
15
|
const yargs_options_1 = require("../src/internal-utils/yargs-options");
|
16
|
-
const show_nx_warning_1 = require("../src/utils/nx/show-nx-warning");
|
17
16
|
const ab_testing_1 = require("../src/utils/nx/ab-testing");
|
18
17
|
const error_utils_1 = require("../src/utils/error-utils");
|
19
18
|
const fs_1 = require("fs");
|
@@ -116,7 +115,6 @@ async function main(parsedArgs) {
|
|
116
115
|
title: `Creating your v${nx_version_1.nxVersion} workspace.`,
|
117
116
|
});
|
118
117
|
const workspaceInfo = await (0, create_workspace_1.createWorkspace)(parsedArgs.preset, parsedArgs);
|
119
|
-
(0, show_nx_warning_1.showNxWarning)(parsedArgs.name);
|
120
118
|
await (0, ab_testing_1.recordStat)({
|
121
119
|
nxVersion: nx_version_1.nxVersion,
|
122
120
|
command: 'create-nx-workspace',
|
package/package.json
CHANGED
@@ -1 +0,0 @@
|
|
1
|
-
export declare function showNxWarning(workspaceName: string): void;
|
@@ -1,29 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.showNxWarning = showNxWarning;
|
4
|
-
const child_process_1 = require("child_process");
|
5
|
-
const path_1 = require("path");
|
6
|
-
const output_1 = require("../output");
|
7
|
-
const package_manager_1 = require("../package-manager");
|
8
|
-
function showNxWarning(workspaceName) {
|
9
|
-
try {
|
10
|
-
const pathToRunNxCommand = (0, path_1.resolve)(process.cwd(), workspaceName);
|
11
|
-
(0, child_process_1.execSync)('nx --version', {
|
12
|
-
cwd: pathToRunNxCommand,
|
13
|
-
stdio: ['ignore', 'ignore', 'ignore'],
|
14
|
-
windowsHide: false,
|
15
|
-
});
|
16
|
-
}
|
17
|
-
catch (e) {
|
18
|
-
// no nx found
|
19
|
-
const { exec, globalAdd } = (0, package_manager_1.getPackageManagerCommand)();
|
20
|
-
output_1.output.addVerticalSeparator();
|
21
|
-
output_1.output.note({
|
22
|
-
title: `Nx CLI is not installed globally.`,
|
23
|
-
bodyLines: [
|
24
|
-
`This means that you will have to use "${exec} nx" to execute commands in the workspace.`,
|
25
|
-
`Run "${globalAdd} nx" to be able to execute command directly.`,
|
26
|
-
],
|
27
|
-
});
|
28
|
-
}
|
29
|
-
}
|