virmator 3.0.4 → 3.0.5
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
CHANGED
|
@@ -126,6 +126,14 @@ Prints this help output.
|
|
|
126
126
|
|
|
127
127
|
Initialize a repo with all virmator config files.
|
|
128
128
|
|
|
129
|
+
### Examples
|
|
130
|
+
|
|
131
|
+
- run init and force all configs to be written: `virmator init force`
|
|
132
|
+
|
|
133
|
+
### force
|
|
134
|
+
|
|
135
|
+
force overwrite files even if they already exist.
|
|
136
|
+
|
|
129
137
|
## spellcheck
|
|
130
138
|
|
|
131
139
|
Spellcheck code with cspell. By default this spellchecks every file in the entire repo (except for those ignored in the config file), including .dot files. If any arguments are passed to this command, the default cspell args that this command applies are ignored, you'll have to supply them via your args.
|
|
@@ -29,7 +29,9 @@ declare const allCommandsArray: readonly [CliCommandDefinition<{
|
|
|
29
29
|
subCommandDescriptions: {};
|
|
30
30
|
}>, CliCommandDefinition<{
|
|
31
31
|
commandName: "init";
|
|
32
|
-
subCommandDescriptions: {
|
|
32
|
+
subCommandDescriptions: {
|
|
33
|
+
readonly force: "force overwrite files even if they already exist.";
|
|
34
|
+
};
|
|
33
35
|
}>, CliCommandDefinition<{
|
|
34
36
|
commandName: "update-configs";
|
|
35
37
|
subCommandDescriptions: {};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export declare const initCommandDefinition: import("../cli-command/define-cli-command").CliCommandDefinition<{
|
|
2
2
|
commandName: "init";
|
|
3
|
-
subCommandDescriptions: {
|
|
3
|
+
subCommandDescriptions: {
|
|
4
|
+
readonly force: "force overwrite files even if they already exist.";
|
|
5
|
+
};
|
|
4
6
|
}>;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.initCommandDefinition = void 0;
|
|
4
|
+
const package_name_1 = require("../../package-name");
|
|
4
5
|
const define_cli_command_1 = require("../cli-command/define-cli-command");
|
|
5
6
|
const config_files_1 = require("../config/config-files");
|
|
6
7
|
const copy_config_1 = require("../config/copy-config");
|
|
7
8
|
exports.initCommandDefinition = (0, define_cli_command_1.defineCliCommand)({
|
|
8
9
|
commandName: 'init',
|
|
9
|
-
subCommandDescriptions: {
|
|
10
|
-
|
|
10
|
+
subCommandDescriptions: {
|
|
11
|
+
force: 'force overwrite files even if they already exist.',
|
|
12
|
+
},
|
|
13
|
+
}, ({ commandName, subCommands }) => {
|
|
11
14
|
return {
|
|
12
15
|
sections: [
|
|
13
16
|
{
|
|
@@ -15,13 +18,21 @@ exports.initCommandDefinition = (0, define_cli_command_1.defineCliCommand)({
|
|
|
15
18
|
content: `Initialize a repo with all virmator config files.`,
|
|
16
19
|
},
|
|
17
20
|
],
|
|
18
|
-
examples: [
|
|
21
|
+
examples: [
|
|
22
|
+
{
|
|
23
|
+
title: 'run init and force all configs to be written',
|
|
24
|
+
content: `${package_name_1.packageName} ${commandName} ${subCommands.force}`,
|
|
25
|
+
},
|
|
26
|
+
],
|
|
19
27
|
};
|
|
20
28
|
}, async (inputs) => {
|
|
29
|
+
const copyStyle = inputs.inputSubCommands.includes(inputs.subCommands.force)
|
|
30
|
+
? copy_config_1.CopyConfigOperation.Overwrite
|
|
31
|
+
: copy_config_1.CopyConfigOperation.Init;
|
|
21
32
|
const success = await (0, copy_config_1.copyAllConfigFiles)({
|
|
22
33
|
configFiles: config_files_1.configFiles,
|
|
23
34
|
logging: inputs.logging,
|
|
24
|
-
operation:
|
|
35
|
+
operation: copyStyle,
|
|
25
36
|
repoDir: inputs.repoDir,
|
|
26
37
|
});
|
|
27
38
|
return {
|