quality.md 0.1.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/package.json +33 -0
- package/src/bin.ts +6 -0
- package/src/cli.ts +26 -0
- package/src/index.ts +1 -0
package/package.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "quality.md",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "quality.md CLI",
|
|
6
|
+
"bin": {
|
|
7
|
+
"qualitymd": "./src/bin.ts"
|
|
8
|
+
},
|
|
9
|
+
"exports": {
|
|
10
|
+
".": "./src/index.ts"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"src"
|
|
14
|
+
],
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=22.18.0"
|
|
17
|
+
},
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@effect/platform-node": "4.0.0-beta.80",
|
|
23
|
+
"effect": "4.0.0-beta.80"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@types/node": "^25.9.3",
|
|
27
|
+
"typescript": "^6.0.3"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"start": "node ./src/bin.ts",
|
|
31
|
+
"typecheck": "tsc --build"
|
|
32
|
+
}
|
|
33
|
+
}
|
package/src/bin.ts
ADDED
package/src/cli.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Console } from "effect"
|
|
2
|
+
import { Command, Flag } from "effect/unstable/cli"
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The root `qualitymd` command.
|
|
6
|
+
*
|
|
7
|
+
* Add subcommands with `Command.withSubcommands` as the CLI grows.
|
|
8
|
+
*/
|
|
9
|
+
const root = Command.make(
|
|
10
|
+
"qualitymd",
|
|
11
|
+
{
|
|
12
|
+
name: Flag.string("name").pipe(
|
|
13
|
+
Flag.withAlias("n"),
|
|
14
|
+
Flag.withDescription("Who to greet"),
|
|
15
|
+
Flag.withDefault("world")
|
|
16
|
+
)
|
|
17
|
+
},
|
|
18
|
+
({ name }) => Console.log(`Hello, ${name}! quality.md is ready.`)
|
|
19
|
+
).pipe(Command.withDescription("quality.md command-line interface"))
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Parses the provided arguments and runs the root command. The resulting
|
|
23
|
+
* `Effect` still requires the CLI `Environment`, which the entry point
|
|
24
|
+
* (`bin.ts`) provides via the Node services layer.
|
|
25
|
+
*/
|
|
26
|
+
export const run = Command.run(root, { version: "0.0.0" })
|
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { run } from "./cli.ts"
|