@repokit/core 1.9.0 → 2.0.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 +39 -4
- package/media/new-command.webp +0 -0
- package/media/post-init.webp +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -81,6 +81,8 @@ repokit
|
|
|
81
81
|
|
|
82
82
|
The CLI will list out its internal commands as well as any commands you registered in your config file.
|
|
83
83
|
|
|
84
|
+
<img src="media/post-init.webp" alt="Help screen after initialization" />
|
|
85
|
+
|
|
84
86
|
Next run:
|
|
85
87
|
|
|
86
88
|
```bash
|
|
@@ -95,16 +97,49 @@ To begin building your CLI, run:
|
|
|
95
97
|
repokit register ./path/to/your/feature
|
|
96
98
|
```
|
|
97
99
|
|
|
98
|
-
This command generates a tool definition for your feature that you can fill out using your tool's API's.
|
|
100
|
+
This command generates a tool definition for your feature that you can fill out using your tool's API's. A tool definition might look something like the following:
|
|
101
|
+
|
|
102
|
+
```typescript
|
|
103
|
+
import { RepoKitCommand } from "@repokit/core";
|
|
104
|
+
|
|
105
|
+
export const Commands = new RepoKitCommand({
|
|
106
|
+
name: "user-interface",
|
|
107
|
+
description: "Build commands for the UI",
|
|
108
|
+
commands: {
|
|
109
|
+
"build:production": {
|
|
110
|
+
command: "vite build",
|
|
111
|
+
description: "Build the UI for production",
|
|
112
|
+
args: {
|
|
113
|
+
"(--optimization | -o)":
|
|
114
|
+
"Run post-build optimizers such as compression and css purging",
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
"run:development": {
|
|
118
|
+
command: "vite",
|
|
119
|
+
description: "Run the UI in development mode",
|
|
120
|
+
args: {
|
|
121
|
+
"(--port | -p)":
|
|
122
|
+
"Specifies the port number to run the development server on",
|
|
123
|
+
"(--open | -o)": "Opens your OS' preferred browser",
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
});
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
When finished with your definition, save the file and run:
|
|
99
131
|
|
|
100
132
|
```bash
|
|
101
|
-
repokit
|
|
133
|
+
repokit user-interface
|
|
102
134
|
```
|
|
103
135
|
|
|
104
|
-
The CLI will list out your new tool's API's
|
|
136
|
+
The CLI will list out your new tool's API's:
|
|
137
|
+
<img src="media/new-command.webp" alt="Command definition" />
|
|
138
|
+
|
|
139
|
+
To invoke any of them, run:
|
|
105
140
|
|
|
106
141
|
```bash
|
|
107
|
-
repokit
|
|
142
|
+
repokit user-interface <sub-command> <args>
|
|
108
143
|
```
|
|
109
144
|
|
|
110
145
|
### Reasoning about your toolchain
|
|
Binary file
|
|
Binary file
|