@thi.ng/args 2.0.7 → 2.1.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/CHANGELOG.md +124 -55
- package/README.md +2 -2
- package/package.json +93 -88
- package/tools/test.js +19 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,108 +1,177 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
- **Last updated**: 2021-11-21T17:09:28Z
|
|
4
|
+
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
|
|
5
|
+
|
|
3
6
|
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
7
|
+
See [Conventional Commits](https://conventionalcommits.org/) for commit guidelines.
|
|
8
|
+
|
|
9
|
+
**Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
|
|
10
|
+
and/or version bumps of transitive dependencies.
|
|
11
|
+
|
|
12
|
+
## [2.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@2.1.0) (2021-11-17)
|
|
5
13
|
|
|
6
|
-
|
|
14
|
+
#### 🚀 Features
|
|
7
15
|
|
|
8
|
-
|
|
16
|
+
- Using workspaces for local tools ([bf7a404](https://github.com/thi-ng/umbrella/commit/bf7a404))
|
|
17
|
+
Improving the overall build ergonomics
|
|
18
|
+
- introduced a tools workspaces
|
|
19
|
+
- imported it in all needed packages/examples
|
|
20
|
+
- inclusive project root
|
|
9
21
|
|
|
22
|
+
#### ♻️ Refactoring
|
|
10
23
|
|
|
24
|
+
- testrunner to binary ([4ebbbb2](https://github.com/thi-ng/umbrella/commit/4ebbbb2))
|
|
25
|
+
this commit reverts (partly) changes made in:
|
|
26
|
+
ef346d7a8753590dc9094108a3d861a8dbd5dd2c
|
|
27
|
+
overall purpose is better testament ergonomics:
|
|
28
|
+
instead of having to pass NODE_OPTIONS with every invocation
|
|
29
|
+
having a binary to handle this for us.
|
|
11
30
|
|
|
31
|
+
### [2.0.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@2.0.1) (2021-10-13)
|
|
12
32
|
|
|
33
|
+
#### ♻️ Refactoring
|
|
13
34
|
|
|
14
|
-
|
|
35
|
+
- update imports in all tests/pkgs ([effd591](https://github.com/thi-ng/umbrella/commit/effd591))
|
|
36
|
+
- update imports in all pkgs ([5fa2b6f](https://github.com/thi-ng/umbrella/commit/5fa2b6f))
|
|
37
|
+
- add .js suffix for all relative imports
|
|
15
38
|
|
|
39
|
+
# [2.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@2.0.0) (2021-10-12)
|
|
16
40
|
|
|
17
|
-
|
|
41
|
+
#### 🛑 Breaking changes
|
|
18
42
|
|
|
19
|
-
|
|
43
|
+
- major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea))
|
|
44
|
+
- BREAKING CHANGE: discontinue CommonJS & UMD versions
|
|
45
|
+
- only ESM modules will be published from now on
|
|
46
|
+
- CJS obsolete due to ESM support in recent versions of node:
|
|
47
|
+
- i.e. launch NodeJS via:
|
|
48
|
+
- `node --experimental-specifier-resolution=node --experimental-repl-await`
|
|
49
|
+
- in the node REPL use `await import(...)` instead of `require()`
|
|
50
|
+
- UMD obsolete due to widespread browser support for ESM
|
|
51
|
+
Also:
|
|
52
|
+
- normalize/restructure/reorg all package.json files
|
|
53
|
+
- cleanup all build scripts, remove obsolete
|
|
54
|
+
- switch from mocha to [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament) for all tests
|
|
20
55
|
|
|
56
|
+
#### ♻️ Refactoring
|
|
21
57
|
|
|
22
|
-
|
|
58
|
+
- update imports ([890936b](https://github.com/thi-ng/umbrella/commit/890936b))
|
|
59
|
+
- update all tests in _all_ pkgs ([8b582bc](https://github.com/thi-ng/umbrella/commit/8b582bc))
|
|
60
|
+
- update all to use [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament)
|
|
23
61
|
|
|
24
|
-
|
|
62
|
+
### [1.1.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@1.1.1) (2021-09-03)
|
|
25
63
|
|
|
26
|
-
|
|
27
|
-
- CJS obsolete due to ESM support in recent versions of node:
|
|
28
|
-
- i.e. launch NodeJS via:
|
|
29
|
-
- `node --experimental-specifier-resolution=node --experimental-repl-await`
|
|
30
|
-
- in the node REPL use `await import(...)` instead of `require()`
|
|
31
|
-
- UMD obsolete due to widespread browser support for ESM
|
|
64
|
+
#### ♻️ Refactoring
|
|
32
65
|
|
|
33
|
-
|
|
34
|
-
- normalize/restructure/reorg all package.json files
|
|
35
|
-
- cleanup all build scripts, remove obsolete
|
|
36
|
-
- switch from mocha to @thi.ng/testament for all tests
|
|
66
|
+
- fix up TS4.4 changes ([ba616db](https://github.com/thi-ng/umbrella/commit/ba616db))
|
|
37
67
|
|
|
68
|
+
## [1.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@1.1.0) (2021-08-19)
|
|
38
69
|
|
|
70
|
+
#### 🚀 Features
|
|
39
71
|
|
|
72
|
+
- capitalize usage section headings ([eaa0f23](https://github.com/thi-ng/umbrella/commit/eaa0f23))
|
|
40
73
|
|
|
74
|
+
### [0.7.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@0.7.1) (2021-07-29)
|
|
41
75
|
|
|
76
|
+
#### 🩹 Bug fixes
|
|
42
77
|
|
|
43
|
-
|
|
78
|
+
- omit empty groups from usage() ([a66c19a](https://github.com/thi-ng/umbrella/commit/a66c19a))
|
|
44
79
|
|
|
45
|
-
|
|
80
|
+
## [0.7.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@0.7.0) (2021-07-01)
|
|
46
81
|
|
|
47
|
-
|
|
82
|
+
#### 🚀 Features
|
|
48
83
|
|
|
49
|
-
|
|
84
|
+
- add showGroupNames option ([6917111](https://github.com/thi-ng/umbrella/commit/6917111))
|
|
50
85
|
|
|
51
|
-
|
|
86
|
+
## [0.6.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@0.6.0) (2021-06-08)
|
|
52
87
|
|
|
53
|
-
|
|
88
|
+
#### 🚀 Features
|
|
54
89
|
|
|
55
|
-
|
|
90
|
+
- add kvPairsMulti(), update coerceKV() ([fd12f80](https://github.com/thi-ng/umbrella/commit/fd12f80))
|
|
91
|
+
- add KVMultiDict type alias
|
|
92
|
+
- update tests
|
|
56
93
|
|
|
57
|
-
|
|
94
|
+
## [0.5.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@0.5.0) (2021-03-28)
|
|
58
95
|
|
|
59
|
-
|
|
96
|
+
#### 🚀 Features
|
|
60
97
|
|
|
61
|
-
|
|
98
|
+
- add vec() arg type ([f05cb2a](https://github.com/thi-ng/umbrella/commit/f05cb2a))
|
|
99
|
+
- wordwrap usage prefix/suffix, defaults ([325b558](https://github.com/thi-ng/umbrella/commit/325b558))
|
|
100
|
+
- update/revert default val handling in usage(), don't show null/false
|
|
101
|
+
- minor other usage() refactoring
|
|
102
|
+
- update doc strings
|
|
62
103
|
|
|
63
|
-
###
|
|
104
|
+
### [0.4.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@0.4.1) (2021-03-24)
|
|
64
105
|
|
|
65
|
-
|
|
106
|
+
#### ♻️ Refactoring
|
|
66
107
|
|
|
67
|
-
|
|
108
|
+
- update wordwrapping in usage() ([4af3d41](https://github.com/thi-ng/umbrella/commit/4af3d41))
|
|
68
109
|
|
|
69
|
-
|
|
110
|
+
## [0.4.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@0.4.0) (2021-03-22)
|
|
70
111
|
|
|
71
|
-
|
|
72
|
-
- **args:** wordwrap usage prefix/suffix, defaults ([325b558](https://github.com/thi-ng/umbrella/commit/325b558f74f8dbfaa2c7de72c6800cdbc8c54acd))
|
|
112
|
+
#### 🚀 Features
|
|
73
113
|
|
|
74
|
-
|
|
114
|
+
- add arg groups, segment usage output ([ebf5197](https://github.com/thi-ng/umbrella/commit/ebf5197))
|
|
115
|
+
- add `ArgSpecBase.group` to classify args
|
|
116
|
+
- update arg factories to define default groups ("flags" & "main")
|
|
117
|
+
- update usage() to output segmented & sorted groups of args
|
|
118
|
+
- support arbitrary length aliases ([1cfdf49](https://github.com/thi-ng/umbrella/commit/1cfdf49))
|
|
119
|
+
- update parseKey() to allow any length aliases
|
|
120
|
+
- add test
|
|
75
121
|
|
|
76
|
-
###
|
|
122
|
+
### [0.3.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@0.3.1) (2021-03-21)
|
|
77
123
|
|
|
78
|
-
|
|
79
|
-
- **args:** support arbitrary length aliases ([1cfdf49](https://github.com/thi-ng/umbrella/commit/1cfdf49a53cca2f80836caf428e220e90f687ad1))
|
|
124
|
+
#### 🩹 Bug fixes
|
|
80
125
|
|
|
81
|
-
|
|
126
|
+
- fix usage() show defaults logic ([ae31158](https://github.com/thi-ng/umbrella/commit/ae31158))
|
|
127
|
+
- show all default values (incl. zero, false), only skip undefined
|
|
82
128
|
|
|
83
|
-
|
|
129
|
+
## [0.3.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@0.3.0) (2021-03-20)
|
|
84
130
|
|
|
85
|
-
|
|
131
|
+
#### 🚀 Features
|
|
86
132
|
|
|
87
|
-
|
|
133
|
+
- update ParseOpts, UsageOpts ([6577c80](https://github.com/thi-ng/umbrella/commit/6577c80))
|
|
134
|
+
- add `ParseOpts.help` to configure special `--help` option(s)
|
|
135
|
+
- add `UsageOpts.prefix/suffix` strings
|
|
88
136
|
|
|
89
|
-
|
|
137
|
+
## [0.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@0.2.0) (2021-01-13)
|
|
90
138
|
|
|
91
|
-
|
|
139
|
+
#### 🚀 Features
|
|
92
140
|
|
|
93
|
-
|
|
141
|
+
- add defaultHint opt, update usage() ([f8a4146](https://github.com/thi-ng/umbrella/commit/f8a4146))
|
|
142
|
+
- add UsageOpts.showDefaults to display arg default vals
|
|
143
|
+
- add ArgSpecBase.defaultHint for default vals for display purposes
|
|
94
144
|
|
|
95
|
-
|
|
145
|
+
#### ♻️ Refactoring
|
|
96
146
|
|
|
97
|
-
-
|
|
147
|
+
- splitup parse() into smaller fns ([64be608](https://github.com/thi-ng/umbrella/commit/64be608))
|
|
98
148
|
|
|
99
|
-
|
|
149
|
+
## [0.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@0.1.0) (2021-01-10)
|
|
100
150
|
|
|
101
|
-
|
|
151
|
+
#### 🚀 Features
|
|
102
152
|
|
|
103
|
-
-
|
|
104
|
-
-
|
|
105
|
-
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
153
|
+
- add tuple arg type support ([a05dde9](https://github.com/thi-ng/umbrella/commit/a05dde9))
|
|
154
|
+
- update multi arg specs, parse ([dbdf913](https://github.com/thi-ng/umbrella/commit/dbdf913))
|
|
155
|
+
- simplify Args conditionals (remove special casing for string(s))
|
|
156
|
+
- replace spec.comma => spec.delim
|
|
157
|
+
- update ParseResult
|
|
158
|
+
- update parse() to stop at first non-arg value
|
|
159
|
+
- add/update tests
|
|
160
|
+
- add strict mode kvArgs()/coerceKV(), add docs ([b76c4f1](https://github.com/thi-ng/umbrella/commit/b76c4f1))
|
|
161
|
+
- add kv args, callbacks, usage opts ([c306aba](https://github.com/thi-ng/umbrella/commit/c306aba))
|
|
162
|
+
- add KVDict type, coerceKV(), kvPairs()
|
|
163
|
+
- add optional `fn` arg spec callbacks
|
|
164
|
+
- add `--help` built-in handling
|
|
165
|
+
- add ColorTheme, update usage()
|
|
166
|
+
- major general package update ([26ec49a](https://github.com/thi-ng/umbrella/commit/26ec49a))
|
|
167
|
+
- use more mapped types to better infer & verify specs for optional args
|
|
168
|
+
- add support for comma separated multi-args
|
|
169
|
+
- add ParseOpts & UsageOpts
|
|
170
|
+
- add/replace coercions
|
|
171
|
+
- add arg spec factories
|
|
172
|
+
- update parse()
|
|
173
|
+
- add comma handling
|
|
174
|
+
- auto-usage on error
|
|
175
|
+
- kebab -> camelCase names
|
|
176
|
+
- update/rewrite usage(), add color support
|
|
177
|
+
- import as new package ([af5d943](https://github.com/thi-ng/umbrella/commit/af5d943))
|
package/README.md
CHANGED
|
@@ -158,7 +158,7 @@ try {
|
|
|
158
158
|
|
|
159
159
|
Usage information can be generated via `usage()` and is automatically triggered
|
|
160
160
|
via the special `--help` option (configurable, see
|
|
161
|
-
[ParseOpts](https://docs.thi.ng/umbrella/args/interfaces/
|
|
161
|
+
[ParseOpts](https://docs.thi.ng/umbrella/args/interfaces/ParseOpts.html)).
|
|
162
162
|
|
|
163
163
|
Each arg can be associated with arbitrary group IDs, which are then used to
|
|
164
164
|
segment usage output. By default, `flag()` args are assigned to a `"flags"`
|
|
@@ -168,7 +168,7 @@ factory function.
|
|
|
168
168
|
|
|
169
169
|
By default, ANSI colors are used to format the result string of `usage()`, but
|
|
170
170
|
can be disabled (see
|
|
171
|
-
[`UsageOpts`](https://docs.thi.ng/umbrella/args/interfaces/
|
|
171
|
+
[`UsageOpts`](https://docs.thi.ng/umbrella/args/interfaces/UsageOpts.html)).
|
|
172
172
|
|
|
173
173
|
```text
|
|
174
174
|
ts-node index.ts --help
|
package/package.json
CHANGED
|
@@ -1,95 +1,100 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
"name": "@thi.ng/args",
|
|
3
|
+
"version": "2.1.2",
|
|
4
|
+
"description": "Declarative, functional & typechecked CLI argument/options parser, value coercions etc.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"module": "./index.js",
|
|
7
|
+
"typings": "./index.d.ts",
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/thi-ng/umbrella.git"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://github.com/thi-ng/umbrella/tree/master/packages/args#readme",
|
|
14
|
+
"funding": [
|
|
15
|
+
{
|
|
16
|
+
"type": "github",
|
|
17
|
+
"url": "https://github.com/sponsors/postspectacular"
|
|
12
18
|
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
19
|
+
{
|
|
20
|
+
"type": "patreon",
|
|
21
|
+
"url": "https://patreon.com/thing_umbrella"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"author": "Karsten Schmidt <k+npm@thi.ng>",
|
|
25
|
+
"license": "Apache-2.0",
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "yarn clean && tsc --declaration",
|
|
28
|
+
"clean": "rimraf '*.js' '*.d.ts' '*.map' doc",
|
|
29
|
+
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
|
|
30
|
+
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
|
|
31
|
+
"doc:readme": "yarn doc:stats && tools:readme",
|
|
32
|
+
"doc:stats": "tools:module-stats",
|
|
33
|
+
"pub": "yarn npm publish --access public",
|
|
34
|
+
"test": "testament test"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@thi.ng/api": "^8.3.2",
|
|
38
|
+
"@thi.ng/checks": "^3.1.2",
|
|
39
|
+
"@thi.ng/errors": "^2.1.2",
|
|
40
|
+
"@thi.ng/strings": "^3.2.2"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@microsoft/api-extractor": "^7.18.19",
|
|
44
|
+
"@thi.ng/testament": "^0.2.2",
|
|
45
|
+
"rimraf": "^3.0.2",
|
|
46
|
+
"tools": "^0.0.1",
|
|
47
|
+
"typedoc": "^0.22.9",
|
|
48
|
+
"typescript": "^4.5.2"
|
|
49
|
+
},
|
|
50
|
+
"keywords": [
|
|
51
|
+
"argument",
|
|
52
|
+
"ansi",
|
|
53
|
+
"cli",
|
|
54
|
+
"coerce",
|
|
55
|
+
"color",
|
|
56
|
+
"conversion",
|
|
57
|
+
"declarative",
|
|
58
|
+
"functional",
|
|
59
|
+
"hex",
|
|
60
|
+
"node",
|
|
61
|
+
"parser",
|
|
62
|
+
"tuple",
|
|
63
|
+
"typescript",
|
|
64
|
+
"validate"
|
|
65
|
+
],
|
|
66
|
+
"publishConfig": {
|
|
67
|
+
"access": "public"
|
|
68
|
+
},
|
|
69
|
+
"engines": {
|
|
70
|
+
"node": ">=12.7"
|
|
71
|
+
},
|
|
72
|
+
"files": [
|
|
73
|
+
"*.js",
|
|
74
|
+
"*.d.ts"
|
|
75
|
+
],
|
|
76
|
+
"exports": {
|
|
77
|
+
".": {
|
|
78
|
+
"import": "./index.js"
|
|
35
79
|
},
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
"@thi.ng/checks": "^3.0.6",
|
|
39
|
-
"@thi.ng/errors": "^2.0.6",
|
|
40
|
-
"@thi.ng/strings": "^3.1.3"
|
|
80
|
+
"./api": {
|
|
81
|
+
"import": "./api.js"
|
|
41
82
|
},
|
|
42
|
-
"
|
|
43
|
-
|
|
83
|
+
"./args": {
|
|
84
|
+
"import": "./args.js"
|
|
44
85
|
},
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
"ansi",
|
|
48
|
-
"cli",
|
|
49
|
-
"coerce",
|
|
50
|
-
"color",
|
|
51
|
-
"conversion",
|
|
52
|
-
"declarative",
|
|
53
|
-
"functional",
|
|
54
|
-
"hex",
|
|
55
|
-
"node",
|
|
56
|
-
"parser",
|
|
57
|
-
"tuple",
|
|
58
|
-
"typescript",
|
|
59
|
-
"validate"
|
|
60
|
-
],
|
|
61
|
-
"publishConfig": {
|
|
62
|
-
"access": "public"
|
|
86
|
+
"./coerce": {
|
|
87
|
+
"import": "./coerce.js"
|
|
63
88
|
},
|
|
64
|
-
"
|
|
65
|
-
|
|
89
|
+
"./parse": {
|
|
90
|
+
"import": "./parse.js"
|
|
66
91
|
},
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
"import": "./api.js"
|
|
77
|
-
},
|
|
78
|
-
"./args": {
|
|
79
|
-
"import": "./args.js"
|
|
80
|
-
},
|
|
81
|
-
"./coerce": {
|
|
82
|
-
"import": "./coerce.js"
|
|
83
|
-
},
|
|
84
|
-
"./parse": {
|
|
85
|
-
"import": "./parse.js"
|
|
86
|
-
},
|
|
87
|
-
"./usage": {
|
|
88
|
-
"import": "./usage.js"
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
"thi.ng": {
|
|
92
|
-
"year": 2018
|
|
93
|
-
},
|
|
94
|
-
"gitHead": "852cd2450617c86d15d18477dc634f17f04202eb"
|
|
95
|
-
}
|
|
92
|
+
"./usage": {
|
|
93
|
+
"import": "./usage.js"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"thi.ng": {
|
|
97
|
+
"year": 2018
|
|
98
|
+
},
|
|
99
|
+
"gitHead": "e8a7c2a40191b391cef182c2978e5a6c85987a87\n"
|
|
100
|
+
}
|
package/tools/test.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const args = require("@thi.ng/args");
|
|
2
|
+
const { argFlag } = require("@thi.ng/args");
|
|
3
|
+
|
|
4
|
+
const opts = args.parse(
|
|
5
|
+
{
|
|
6
|
+
help: {
|
|
7
|
+
coerce: () => {
|
|
8
|
+
throw new Error();
|
|
9
|
+
},
|
|
10
|
+
flag: true,
|
|
11
|
+
desc: "Show this help",
|
|
12
|
+
},
|
|
13
|
+
optimize: argFlag({ alias: "o", desc: "optimize", default: false }),
|
|
14
|
+
minify: argFlag({ alias: "m", desc: "minify", default: false }),
|
|
15
|
+
},
|
|
16
|
+
process.argv
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
console.log(opts);
|