@h3ravel/musket 0.4.0 → 0.5.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 +26 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -73,6 +73,32 @@ Kernel.init(app, {
|
|
|
73
73
|
});
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
+
### Advanced Initialization
|
|
77
|
+
|
|
78
|
+
You can also initialize **Musket CLI** with precise controls
|
|
79
|
+
|
|
80
|
+
```ts
|
|
81
|
+
import { Kernel } from 'h3ravel/musket';
|
|
82
|
+
|
|
83
|
+
const app = new Application();
|
|
84
|
+
|
|
85
|
+
const instance = new Kernel(app)
|
|
86
|
+
.setCwd(process.cwd())
|
|
87
|
+
.setConfig({
|
|
88
|
+
cliName: 'musket-cli',
|
|
89
|
+
discoveryPaths: [path.join(process.cwd(), 'tests/Commands/*.ts')],
|
|
90
|
+
})
|
|
91
|
+
.setPackages([
|
|
92
|
+
{ name: '@h3ravel/shared', alias: 'Shared PKG' },
|
|
93
|
+
'@h3ravel/support',
|
|
94
|
+
])
|
|
95
|
+
.bootstrap();
|
|
96
|
+
|
|
97
|
+
return await instance.run();
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
> NB: Packages in the config will be ignored when initializing in this way, as a work around, chain the `setPackages` method to the Kernel intance and pass your options
|
|
101
|
+
|
|
76
102
|
## Creating Commands
|
|
77
103
|
|
|
78
104
|
Commands in Musket extend the base `Command` class and define a **signature** and **handle()** method.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@h3ravel/musket",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Musket CLI is a framework-agnostic CLI framework designed to allow you build artisan-like CLI apps and for use in the H3ravel framework.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|