create-moost 0.5.24 → 0.5.26
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-moost",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.26",
|
|
4
4
|
"description": "create-moost",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"@prostojs/rewrite": "^0.1.1",
|
|
47
47
|
"@wooksjs/event-cli": "^0.5.25",
|
|
48
48
|
"prompts": "^2.4.2",
|
|
49
|
-
"@moostjs/event-cli": "^0.5.
|
|
50
|
-
"moost": "^0.5.
|
|
49
|
+
"@moostjs/event-cli": "^0.5.26",
|
|
50
|
+
"moost": "^0.5.26"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@moostjs/vite": "^0.5.21",
|
package/templates/cli/README.md
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# {{ projectName }}
|
|
2
|
+
|
|
3
|
+
## Moost CLI Template
|
|
2
4
|
|
|
3
5
|
This template provides a simple CLI application using Moost CLI. It demonstrates how to define commands with decorators, build the project with Rolldown, and run it in different environments.
|
|
4
6
|
|
|
@@ -30,12 +32,13 @@ You can test the CLI in multiple ways:
|
|
|
30
32
|
|
|
31
33
|
```bash
|
|
32
34
|
npm run build
|
|
33
|
-
npx
|
|
35
|
+
npx {{ packageName }} <command> [options]
|
|
34
36
|
```
|
|
35
37
|
|
|
36
38
|
Example:
|
|
37
39
|
|
|
38
40
|
```bash
|
|
41
|
+
npm run build
|
|
39
42
|
npx {{ packageName }} hello world
|
|
40
43
|
```
|
|
41
44
|
|
|
@@ -2,6 +2,7 @@ import { CliApp, Controller, Cli, Param, CliExample, CliOption, Description } fr
|
|
|
2
2
|
|
|
3
3
|
@Controller()
|
|
4
4
|
class Commands {
|
|
5
|
+
@Description('Prints a greeting')
|
|
5
6
|
@CliExample('hello world', 'Prints "Hello, world!"')
|
|
6
7
|
@CliExample('hello world -u', 'Prints "HELLO, WORLD!"')
|
|
7
8
|
@Cli('hello/:name')
|
|
@@ -25,7 +26,7 @@ class Commands {
|
|
|
25
26
|
function run() {
|
|
26
27
|
new CliApp()
|
|
27
28
|
.controllers(Commands)
|
|
28
|
-
.useHelp({ name: '
|
|
29
|
+
.useHelp({ name: '{{ packageName }}', title: ''})
|
|
29
30
|
.useOptions([{ keys: ['help'], description: 'Display instructions for the command.' }])
|
|
30
31
|
.start()
|
|
31
32
|
}
|