complete-cli 1.5.1 → 1.5.2
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/README.md +1 -1
- package/dist/commands/InitCommand.js +1 -1
- package/dist/commands/InitCommand.js.map +1 -1
- package/dist/commands/init/vsCodeInit.js +8 -8
- package/dist/commands/init/vsCodeInit.js.map +1 -1
- package/file-templates/static/.vscode/settings.json +3 -3
- package/package.json +1 -1
- package/src/commands/InitCommand.ts +1 -1
- package/src/commands/init/vsCodeInit.ts +8 -8
package/README.md
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/complete-cli)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
`complete-cli` is a CLI tool that helps you bootstrap [TypeScript](https://www.typescriptlang.org/) projects.
|
|
6
6
|
|
|
7
7
|
Please see the [docs](https://complete-ts.github.io/complete-cli) for more information.
|
|
@@ -24,7 +24,7 @@ export class InitCommand extends Command {
|
|
|
24
24
|
description: "Initialize the project into the specified directory (instead of creating a new one based on the name or using the current working directory).",
|
|
25
25
|
});
|
|
26
26
|
vsCode = Option.Boolean("--vscode", false, {
|
|
27
|
-
description: "Open the project in
|
|
27
|
+
description: "Open the project in Visual Studio Code after initialization.",
|
|
28
28
|
});
|
|
29
29
|
npm = Option.Boolean("--npm", false, {
|
|
30
30
|
description: "Use npm as the package manager.",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InitCommand.js","sourceRoot":"","sources":["../../../../src/commands/InitCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,8BAA8B,EAAE,MAAM,WAAW,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE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2FAA2F;QAC3F,MAAM,aAAa,CACjB,WAAW,EACX,UAAU,EACV,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,IAAI,CAAC,WAAW,EAChB,cAAc,CACf,CAAC;QAEF,MAAM,UAAU,CAAC,WAAW,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QAErD,SAAS,CAAC,2BAA2B,CAAC,CAAC;IACzC,CAAC"}
|
|
@@ -11,7 +11,7 @@ const VS_CODE_COMMANDS = [
|
|
|
11
11
|
export async function vsCodeInit(projectPath, vscode, yes) {
|
|
12
12
|
const VSCodeCommand = await getVSCodeCommand();
|
|
13
13
|
if (VSCodeCommand === undefined) {
|
|
14
|
-
promptLog('
|
|
14
|
+
promptLog('Visual Studio Code does not seem to be installed. (The "code" command is not in the path.) Skipping Visual Studio Code extension installation.');
|
|
15
15
|
return;
|
|
16
16
|
}
|
|
17
17
|
await installVSCodeExtensions(projectPath, VSCodeCommand);
|
|
@@ -19,8 +19,8 @@ export async function vsCodeInit(projectPath, vscode, yes) {
|
|
|
19
19
|
}
|
|
20
20
|
async function getVSCodeCommand() {
|
|
21
21
|
for (const command of VS_CODE_COMMANDS) {
|
|
22
|
-
// We want to only check for one command at a time, since it is unlikely that the special
|
|
23
|
-
// commands will exist.
|
|
22
|
+
// We want to only check for one command at a time, since it is unlikely that the special Visual
|
|
23
|
+
// Studio Code commands will exist.
|
|
24
24
|
// eslint-disable-next-line no-await-in-loop
|
|
25
25
|
const exists = await commandExists(command);
|
|
26
26
|
if (exists) {
|
|
@@ -30,9 +30,9 @@ async function getVSCodeCommand() {
|
|
|
30
30
|
return undefined;
|
|
31
31
|
}
|
|
32
32
|
async function installVSCodeExtensions(projectPath, vsCodeCommand) {
|
|
33
|
-
// Installing extensions from inside WSL on Windows will result in the
|
|
34
|
-
// exiting for some reason. Thus, skip this step on Linux. (Linux users will probably be
|
|
35
|
-
// enough to install the extensions on their own.)
|
|
33
|
+
// Installing extensions from inside WSL on Windows will result in the Visual Studio Code process
|
|
34
|
+
// never exiting for some reason. Thus, skip this step on Linux. (Linux users will probably be
|
|
35
|
+
// smart enough to install the extensions on their own.)
|
|
36
36
|
if (process.platform === "linux") {
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
@@ -61,10 +61,10 @@ async function promptVSCode(projectPath, VSCodeCommand, vscode, yes) {
|
|
|
61
61
|
}
|
|
62
62
|
if (yes) {
|
|
63
63
|
// They supplied the "--yes" command-line flag, which implies that they want a silent install,
|
|
64
|
-
// so skip opening
|
|
64
|
+
// so skip opening Visual Studio Code.
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
|
-
// The
|
|
67
|
+
// The Visual Studio Code command does not work properly inside WSL on Windows.
|
|
68
68
|
if (process.platform === "linux") {
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vsCodeInit.js","sourceRoot":"","sources":["../../../../../src/commands/init/vsCodeInit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAExE,MAAM,gBAAgB,GAAG;IACvB,MAAM;IACN,QAAQ;IACR,UAAU;IACV,eAAe;CACP,CAAC;AAEX,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,WAAmB,EACnB,MAAe,EACf,GAAY;IAEZ,MAAM,aAAa,GAAG,MAAM,gBAAgB,EAAE,CAAC;IAC/C,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;QAChC,SAAS,CACP,
|
|
1
|
+
{"version":3,"file":"vsCodeInit.js","sourceRoot":"","sources":["../../../../../src/commands/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a,CAC1C,qDAAqD,CACtD,CAAC;IACF,IAAI,gBAAgB,EAAE,CAAC;QACrB,MAAM,UAAU,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;IAC/C,CAAC;AACH,CAAC;AAED,KAAK,UAAU,UAAU,CAAC,WAAmB,EAAE,aAAqB;IAClE,MAAM,CAAC,CAAA,GAAG,aAAa,IAAI,WAAW,EAAE,CAAC;AAC3C,CAAC"}
|
|
@@ -48,15 +48,15 @@
|
|
|
48
48
|
// Language settings
|
|
49
49
|
// -----------------
|
|
50
50
|
|
|
51
|
-
// By default,
|
|
51
|
+
// By default, Visual Studio Code will not automatically fill-in function arguments.
|
|
52
52
|
"javascript.suggest.completeFunctionCalls": true,
|
|
53
53
|
"typescript.suggest.completeFunctionCalls": true,
|
|
54
54
|
|
|
55
|
-
// By default,
|
|
55
|
+
// By default, Visual Studio Code will prefer non-relative paths for deeply nested files.
|
|
56
56
|
"javascript.preferences.importModuleSpecifier": "project-relative",
|
|
57
57
|
"typescript.preferences.importModuleSpecifier": "project-relative",
|
|
58
58
|
|
|
59
|
-
// By default,
|
|
59
|
+
// By default, Visual Studio Code will not add `import type` automatically.
|
|
60
60
|
"typescript.preferences.preferTypeOnlyAutoImports": true,
|
|
61
61
|
|
|
62
62
|
// Show TypeScript errors for files that don't happen to be currently open, which makes TypeScript
|
package/package.json
CHANGED
|
@@ -32,7 +32,7 @@ export class InitCommand extends Command {
|
|
|
32
32
|
});
|
|
33
33
|
|
|
34
34
|
vsCode = Option.Boolean("--vscode", false, {
|
|
35
|
-
description: "Open the project in
|
|
35
|
+
description: "Open the project in Visual Studio Code after initialization.",
|
|
36
36
|
});
|
|
37
37
|
|
|
38
38
|
npm = Option.Boolean("--npm", false, {
|
|
@@ -18,7 +18,7 @@ export async function vsCodeInit(
|
|
|
18
18
|
const VSCodeCommand = await getVSCodeCommand();
|
|
19
19
|
if (VSCodeCommand === undefined) {
|
|
20
20
|
promptLog(
|
|
21
|
-
'
|
|
21
|
+
'Visual Studio Code does not seem to be installed. (The "code" command is not in the path.) Skipping Visual Studio Code extension installation.',
|
|
22
22
|
);
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
@@ -29,8 +29,8 @@ export async function vsCodeInit(
|
|
|
29
29
|
|
|
30
30
|
async function getVSCodeCommand(): Promise<string | undefined> {
|
|
31
31
|
for (const command of VS_CODE_COMMANDS) {
|
|
32
|
-
// We want to only check for one command at a time, since it is unlikely that the special
|
|
33
|
-
// commands will exist.
|
|
32
|
+
// We want to only check for one command at a time, since it is unlikely that the special Visual
|
|
33
|
+
// Studio Code commands will exist.
|
|
34
34
|
// eslint-disable-next-line no-await-in-loop
|
|
35
35
|
const exists = await commandExists(command);
|
|
36
36
|
if (exists) {
|
|
@@ -45,9 +45,9 @@ async function installVSCodeExtensions(
|
|
|
45
45
|
projectPath: string,
|
|
46
46
|
vsCodeCommand: string,
|
|
47
47
|
) {
|
|
48
|
-
// Installing extensions from inside WSL on Windows will result in the
|
|
49
|
-
// exiting for some reason. Thus, skip this step on Linux. (Linux users will probably be
|
|
50
|
-
// enough to install the extensions on their own.)
|
|
48
|
+
// Installing extensions from inside WSL on Windows will result in the Visual Studio Code process
|
|
49
|
+
// never exiting for some reason. Thus, skip this step on Linux. (Linux users will probably be
|
|
50
|
+
// smart enough to install the extensions on their own.)
|
|
51
51
|
if (process.platform === "linux") {
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
@@ -105,11 +105,11 @@ async function promptVSCode(
|
|
|
105
105
|
|
|
106
106
|
if (yes) {
|
|
107
107
|
// They supplied the "--yes" command-line flag, which implies that they want a silent install,
|
|
108
|
-
// so skip opening
|
|
108
|
+
// so skip opening Visual Studio Code.
|
|
109
109
|
return;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
// The
|
|
112
|
+
// The Visual Studio Code command does not work properly inside WSL on Windows.
|
|
113
113
|
if (process.platform === "linux") {
|
|
114
114
|
return;
|
|
115
115
|
}
|