mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-17 11:03:53 +08:00
26 lines
555 B
TypeScript
26 lines
555 B
TypeScript
const Command = require('../ember-cli/lib/models/command');
|
|
import { 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: any, rawArgs: Array<string>) {
|
|
const keyword = rawArgs[0];
|
|
|
|
const docTask = new DocTask({
|
|
ui: this.ui,
|
|
project: this.project
|
|
});
|
|
|
|
return docTask.run(keyword);
|
|
}
|
|
});
|
|
|
|
export default DocCommand;
|