breadc 0.8.8 → 0.9.0
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 -3
- package/dist/index.cjs +275 -263
- package/dist/index.d.ts +205 -147
- package/dist/index.mjs +276 -261
- package/package.json +15 -5
package/README.md
CHANGED
|
@@ -8,10 +8,9 @@ Yet another Command Line Application Framework with fully strong **[TypeScript](
|
|
|
8
8
|
|
|
9
9
|
## Features
|
|
10
10
|
|
|
11
|
-
+ ⚡️ **Light-weight**: Only 75 kB (Unpacked);
|
|
12
11
|
+ 🔍 **TypeScript Infer**: IDE will automatically infer the type of your command action function;
|
|
13
12
|
+ 💻 **Commands**: Support default command, command alias and sub-commands like `git remote add <name> <url>`;
|
|
14
|
-
+ 📖 **East to Learn**: Breadc is
|
|
13
|
+
+ 📖 **East to Learn**: Breadc is very similar with [cac](https://github.com/cacjs/cac) and there are only 5 APIs for building a CLI application: `breadc`, `command`, `option`, `action`, `run`.
|
|
15
14
|
|
|
16
15
|
## Installation
|
|
17
16
|
|
|
@@ -24,7 +23,7 @@ npm i breadc
|
|
|
24
23
|
Try [./examples/echo.ts](./examples/echo.ts).
|
|
25
24
|
|
|
26
25
|
```ts
|
|
27
|
-
import breadc from 'breadc'
|
|
26
|
+
import { breadc } from 'breadc'
|
|
28
27
|
|
|
29
28
|
const cli = breadc('echo', { version: '1.0.0' })
|
|
30
29
|
.option('--host <host>', { default: 'localhost' })
|