cli-argv-util 1.2.0 → 1.2.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 -0
- package/dist/cli-argv-util.d.ts +2 -1
- package/dist/cli-argv-util.js +6 -1
- package/package.json +14 -9
package/README.md
CHANGED
|
@@ -73,6 +73,7 @@ See the **TypeScript Declarations** at the top of [cli-argv-util.ts](cli-argv-ut
|
|
|
73
73
|
- 🎋 [add-dist-header](https://github.com/center-key/add-dist-header): _Prepend a one-line banner comment (with license notice) to distribution files_
|
|
74
74
|
- 📄 [cli-argv-util](https://github.com/center-key/cli-argv-util): _Copy or rename a file with optional package version number_
|
|
75
75
|
- 📂 [copy-folder-util](https://github.com/center-key/copy-folder-util): _Recursively copy files from one folder to another folder_
|
|
76
|
+
- 🪺 [recursive-exec](https://github.com/center-key/recursive-exec): _Run a command on each file in a folder and its subfolders_
|
|
76
77
|
- 🔍 [replacer-util](https://github.com/center-key/replacer-util): _Find and replace strings or template outputs in text files_
|
|
77
78
|
- 🔢 [rev-web-assets](https://github.com/center-key/rev-web-assets): _Revision web asset filenames with cache busting content hash fingerprints_
|
|
78
79
|
- 🚆 [run-scripts-util](https://github.com/center-key/run-scripts-util): _Organize npm scripts into named groups of easy to manage commands_
|
package/dist/cli-argv-util.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//! cli-argv-util v1.2.
|
|
1
|
+
//! cli-argv-util v1.2.2 ~~ https://github.com/center-key/cli-argv-util ~~ MIT License
|
|
2
2
|
|
|
3
3
|
export type StringFlagMap = {
|
|
4
4
|
[flag: string]: string | undefined;
|
|
@@ -19,5 +19,6 @@ declare const cliArgvUtil: {
|
|
|
19
19
|
run(packageJson: {
|
|
20
20
|
[key: string]: unknown;
|
|
21
21
|
}, posix: string): Buffer;
|
|
22
|
+
readFolder(folder: string): string[];
|
|
22
23
|
};
|
|
23
24
|
export { cliArgvUtil };
|
package/dist/cli-argv-util.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
//! cli-argv-util v1.2.
|
|
1
|
+
//! cli-argv-util v1.2.2 ~~ https://github.com/center-key/cli-argv-util ~~ MIT License
|
|
2
2
|
|
|
3
3
|
import { execSync } from 'node:child_process';
|
|
4
|
+
import fs from 'fs';
|
|
5
|
+
import slash from 'slash';
|
|
4
6
|
const cliArgvUtil = {
|
|
5
7
|
parse(validFlags) {
|
|
6
8
|
const toCamel = (token) => token.replace(/-./g, char => char[1].toUpperCase());
|
|
@@ -27,5 +29,8 @@ const cliArgvUtil = {
|
|
|
27
29
|
const command = process.platform === 'win32' ? posix.replaceAll('\\ ', '" "') : posix;
|
|
28
30
|
return execSync(command.replace(name, 'node bin/cli.js'), { stdio: 'inherit' });
|
|
29
31
|
},
|
|
32
|
+
readFolder(folder) {
|
|
33
|
+
return fs.readdirSync(folder, { recursive: true }).map(file => slash(String(file))).sort();
|
|
34
|
+
},
|
|
30
35
|
};
|
|
31
36
|
export { cliArgvUtil };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cli-argv-util",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "Simple utility to parse command line parameters and flags (arguments vector)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -60,25 +60,30 @@
|
|
|
60
60
|
"clean": [
|
|
61
61
|
"rimraf build dist"
|
|
62
62
|
],
|
|
63
|
-
"
|
|
63
|
+
"lint": [
|
|
64
64
|
"jshint . --exclude-path .gitignore",
|
|
65
|
-
"eslint --max-warnings 0 . --ext .ts"
|
|
65
|
+
"eslint --max-warnings 0 . --ext .ts"
|
|
66
|
+
],
|
|
67
|
+
"build": [
|
|
66
68
|
"tsc",
|
|
67
69
|
"add-dist-header build dist"
|
|
68
70
|
]
|
|
69
71
|
},
|
|
70
72
|
"scripts": {
|
|
71
|
-
"pretest": "run-scripts clean build",
|
|
73
|
+
"pretest": "run-scripts clean lint build",
|
|
72
74
|
"test": "mocha spec/*.spec.js"
|
|
73
75
|
},
|
|
76
|
+
"dependencies": {
|
|
77
|
+
"slash": "~5.1"
|
|
78
|
+
},
|
|
74
79
|
"devDependencies": {
|
|
75
|
-
"@types/node": "~20.
|
|
76
|
-
"@typescript-eslint/eslint-plugin": "~6.
|
|
77
|
-
"@typescript-eslint/parser": "~6.
|
|
78
|
-
"add-dist-header": "~1.
|
|
80
|
+
"@types/node": "~20.5",
|
|
81
|
+
"@typescript-eslint/eslint-plugin": "~6.4",
|
|
82
|
+
"@typescript-eslint/parser": "~6.4",
|
|
83
|
+
"add-dist-header": "~1.2",
|
|
79
84
|
"assert-deep-strict-equal": "~1.1",
|
|
80
85
|
"copy-file-util": "~1.1",
|
|
81
|
-
"eslint": "~8.
|
|
86
|
+
"eslint": "~8.47",
|
|
82
87
|
"jshint": "~2.13",
|
|
83
88
|
"mocha": "~10.2",
|
|
84
89
|
"rimraf": "~5.0",
|