breadc 0.4.0 → 0.4.1
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 +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,8 +24,8 @@ Try [./examples/echo.ts](./examples/echo.ts).
|
|
|
24
24
|
import Breadc from 'breadc'
|
|
25
25
|
|
|
26
26
|
const cli = Breadc('echo', { version: '1.0.0' })
|
|
27
|
-
.option('--host
|
|
28
|
-
.option('--port
|
|
27
|
+
.option('--host [host]', { default: 'localhost' })
|
|
28
|
+
.option('--port [port]', { construct: (port) => (port ? +port : 3000) });
|
|
29
29
|
|
|
30
30
|
cli
|
|
31
31
|
.command('[message]', 'Say something!')
|
package/dist/index.cjs
CHANGED
|
@@ -307,7 +307,7 @@ const _Option = class {
|
|
|
307
307
|
}
|
|
308
308
|
};
|
|
309
309
|
let Option = _Option;
|
|
310
|
-
Option.OptionRE = /^(-[a-zA-Z], )?--([a-zA-Z
|
|
310
|
+
Option.OptionRE = /^(-[a-zA-Z], )?--([a-zA-Z]+)( \[[a-zA-Z]+\]| <[a-zA-Z]+>)?$/;
|
|
311
311
|
|
|
312
312
|
const _Command = class {
|
|
313
313
|
constructor(format, config) {
|
package/dist/index.mjs
CHANGED
|
@@ -300,7 +300,7 @@ const _Option = class {
|
|
|
300
300
|
}
|
|
301
301
|
};
|
|
302
302
|
let Option = _Option;
|
|
303
|
-
Option.OptionRE = /^(-[a-zA-Z], )?--([a-zA-Z
|
|
303
|
+
Option.OptionRE = /^(-[a-zA-Z], )?--([a-zA-Z]+)( \[[a-zA-Z]+\]| <[a-zA-Z]+>)?$/;
|
|
304
304
|
|
|
305
305
|
const _Command = class {
|
|
306
306
|
constructor(format, config) {
|