mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-21 22:34:21 +08:00
- change the URL for the API search - use google search when --search option is true, since angular.io doesn't have a search page anymore - improve the help and doc of the doc command
12 lines
374 B
TypeScript
12 lines
374 B
TypeScript
const Task = require('../ember-cli/lib/models/task');
|
|
const opn = require('opn');
|
|
|
|
export const DocTask: any = Task.extend({
|
|
run: function(keyword: string, search: boolean) {
|
|
const searchUrl = search ? `https://www.google.com/search?q=site%3Aangular.io+${keyword}` :
|
|
`https://angular.io/api?query=${keyword}`;
|
|
|
|
return opn(searchUrl, { wait: false });
|
|
}
|
|
});
|