MCPcopy Index your code
hub / github.com/ember-cli/ember-cli / registerOptions

Function registerOptions

lib/models/command.js:172–188  ·  view source on GitHub ↗

Registers options with command. This method provides the ability to extend or override command options. Expects an object containing anonymousOptions or availableOptions, which it will then merge with existing availableOptions before building the optionsAliases which are used to define short

(options)

Source from the content-addressed store, hash-verified

170 @param {Object} options
171 */
172 registerOptions(options) {
173 let extendedAvailableOptions = (options && options.availableOptions) || [];
174 let extendedAnonymousOptions = (options && options.anonymousOptions) || [];
175
176 this.anonymousOptions = union(this.anonymousOptions.slice(0), extendedAnonymousOptions);
177
178 // merge any availableOptions
179 this.availableOptions = union(this.availableOptions.slice(0), extendedAvailableOptions);
180
181 let optionKeys = uniq(this.availableOptions.map((option) => option.name));
182
183 optionKeys.map(this.mergeDuplicateOption.bind(this));
184
185 this.optionsAliases = this.optionsAliases || {};
186
187 this.availableOptions.map(this.validateOption.bind(this));
188 },
189
190 /**
191 * Called when command is interrupted from outside, e.g. ctrl+C or process kill

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…