File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed
Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -58,12 +58,12 @@ Add your command to the exports in `bin/commands/index.mjs`:
5858``` javascript
5959import generate from ' ./generate.mjs' ;
6060import interactive from ' ./interactive.mjs' ;
61- import myCommand from ' ./my-command.mjs' ; // Add this
61+ import myCommand from ' ./my-command.mjs' ; // Add this
6262
6363export default [
6464 generate,
6565 interactive,
66- myCommand, // Add this
66+ myCommand, // Add this
6767];
6868```
6969
@@ -77,9 +77,9 @@ Options define the flags and parameters your command accepts. Each option has:
7777
7878``` typescript
7979interface Option {
80- flags: string []; // CLI flags (e.g., ['-i', '--input <value>'])
81- desc: string ; // Description for help text
82- prompt? : PromptConfig ; // Interactive mode configuration
80+ flags: string []; // CLI flags (e.g., ['-i', '--input <value>'])
81+ desc: string ; // Description for help text
82+ prompt? : PromptConfig ; // Interactive mode configuration
8383}
8484```
8585
@@ -133,6 +133,7 @@ options: {
133133### Option Types
134134
135135#### ` text `
136+
136137Single-line text input.
137138
138139``` javascript
@@ -145,6 +146,7 @@ prompt: {
145146```
146147
147148#### ` confirm `
149+
148150Yes/no confirmation.
149151
150152``` javascript
@@ -156,6 +158,7 @@ prompt: {
156158```
157159
158160#### ` select `
161+
159162Single choice from a list.
160163
161164``` javascript
@@ -170,6 +173,7 @@ prompt: {
170173```
171174
172175#### ` multiselect `
176+
173177Multiple choices from a list.
174178
175179``` javascript
Original file line number Diff line number Diff line change @@ -105,11 +105,7 @@ export default {
105105
106106 // Write to file if output directory specified
107107 if (output) {
108- await writeFile (
109- join (output, ' documentation.myformat' ),
110- result,
111- ' utf-8'
112- );
108+ await writeFile (join (output, ' documentation.myformat' ), result, ' utf-8' );
113109 }
114110
115111 return result;
@@ -140,7 +136,7 @@ import myFormat from './my-format/index.mjs';
140136
141137export const publicGenerators = {
142138 ' json-simple' : jsonSimple,
143- ' my-format' : myFormat, // Add this
139+ ' my-format' : myFormat, // Add this
144140 // ... other generators
145141};
146142
@@ -306,7 +302,7 @@ Use non-streaming when:
306302``` javascript
307303export default {
308304 name: ' my-generator' ,
309- dependsOn: ' metadata' , // This generator requires metadata output
305+ dependsOn: ' metadata' , // This generator requires metadata output
310306
311307 async generate (input , options ) {
312308 // input contains the output from 'metadata' generator
You can’t perform that action at this time.
0 commit comments