mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-16 18:43:42 +08:00
27 lines
583 B
TypeScript
27 lines
583 B
TypeScript
import * as Command from 'ember-cli/lib/models/command';
|
|
import * as DocTask from '../tasks/doc';
|
|
|
|
const DocCommand = Command.extend({
|
|
name: 'doc',
|
|
description: 'Opens the official Angular documentation for a given keyword.',
|
|
works: 'everywhere',
|
|
|
|
anonymousOptions: [
|
|
'<keyword>'
|
|
],
|
|
|
|
run: function(commandOptions, rawArgs: Array<string>) {
|
|
const keyword = rawArgs[0];
|
|
|
|
const docTask = new DocTask({
|
|
ui: this.ui,
|
|
analytics: this.analytics,
|
|
project: this.project
|
|
});
|
|
|
|
return docTask.run(keyword);
|
|
}
|
|
});
|
|
|
|
module.exports = DocCommand;
|