File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ ts_library(
69
69
"//packages/angular_devkit/core/node" ,
70
70
"//packages/angular_devkit/schematics" ,
71
71
"//packages/angular_devkit/schematics/tools" ,
72
+ "@npm//@angular/core" ,
72
73
"@npm//@types/debug" ,
73
74
"@npm//@types/inquirer" ,
74
75
"@npm//@types/node" ,
@@ -79,6 +80,7 @@ ts_library(
79
80
"@npm//@types/uuid" ,
80
81
"@npm//ansi-colors" ,
81
82
"@npm//jsonc-parser" ,
83
+ "@npm//open" ,
82
84
"@npm//ora" ,
83
85
],
84
86
)
Original file line number Diff line number Diff line change 6
6
* found in the LICENSE file at https://angular.io/license
7
7
*/
8
8
9
+ import * as open from 'open' ;
9
10
import { Command } from '../models/command' ;
10
11
import { Arguments } from '../models/interface' ;
11
12
import { Schema as DocCommandSchema } from './doc' ;
12
13
13
- const open = require ( 'open' ) ;
14
-
15
14
export class DocCommand extends Command < DocCommandSchema > {
16
15
public async run ( options : DocCommandSchema & Arguments ) {
17
16
if ( ! options . keyword ) {
@@ -39,7 +38,7 @@ export class DocCommand extends Command<DocCommandSchema> {
39
38
// and use it if we can find it
40
39
try {
41
40
/* tslint:disable-next-line:no-implicit-dependencies */
42
- const currentNgVersion = require ( '@angular/core' ) . VERSION . major ;
41
+ const currentNgVersion = ( await import ( '@angular/core' ) ) . VERSION . major ;
43
42
domain = `v${ currentNgVersion } .angular.io` ;
44
43
} catch ( e ) { }
45
44
}
You can’t perform that action at this time.
0 commit comments