MCPcopy
hub / github.com/infinitered/gluegun / defaultCommand

Method defaultCommand

src/domain/builder.ts:127–135  ·  view source on GitHub ↗

* Add a default command that runs if none other is found. * @param command An optional command function or object * @return self.

(command?: any)

Source from the content-addressed store, hash-verified

125 * @return self.
126 */
127 public defaultCommand(command?: any): Builder {
128 command = command || coreCommandDefault
129 if (typeof command === 'function') {
130 command = { run: command }
131 }
132 command.name = this.data.brand
133 this.data.defaultCommand = command
134 return this
135 }
136
137 /**
138 * Add a way to add an arbitrary command when building the CLI.

Callers 2

builder.test.tsFile · 0.80
runFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected