File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
packages/angular/cli/commands Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -14,18 +14,18 @@ const opn = require('opn');
14
14
15
15
export class DocCommand extends Command < DocCommandSchema > {
16
16
public async run ( options : DocCommandSchema & Arguments ) {
17
- if ( options . keyword ) {
18
- let searchUrl = `https://angular.io/api?query=${ options . keyword } ` ;
19
- if ( options . search ) {
20
- searchUrl = `https://www.google.com/search?q=site%3Aangular.io+${ options . keyword } ` ;
21
- }
17
+ if ( ! options . keyword ) {
18
+ this . logger . error ( 'You should specify a keyword, for instance, `ng doc ActivatedRoute`.' ) ;
22
19
23
- return opn ( searchUrl , {
24
- wait : false ,
25
- } ) ;
20
+ return 0 ;
21
+ }
22
+ let searchUrl = `https://angular.io/api?query=${ options . keyword } ` ;
23
+ if ( options . search ) {
24
+ searchUrl = `https://www.google.com/search?q=site%3Aangular.io+${ options . keyword } ` ;
26
25
}
27
- this . logger . error ( 'You should specify a keyword, for instance, `ng doc ActivatedRoute`.' ) ;
28
26
29
- return 0 ;
27
+ return opn ( searchUrl , {
28
+ wait : false ,
29
+ } ) ;
30
30
}
31
31
}
You can’t perform that action at this time.
0 commit comments