File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -6,13 +6,13 @@ import fs = require('fs');
6
6
7
7
import Yeoman from './yo/yo' ;
8
8
9
- const yo = new Yeoman ( ) ;
10
-
11
9
export function activate ( context : ExtensionContext ) {
12
10
const cwd = workspace . rootPath ;
13
11
14
12
const disposable = commands . registerCommand ( 'yo' , ( ) => {
15
- return window . showQuickPick ( list ( ) )
13
+ const yo = new Yeoman ( ) ;
14
+
15
+ return window . showQuickPick ( list ( yo ) )
16
16
. then ( generator => {
17
17
if ( generator !== undefined ) {
18
18
yo . run ( generator . label , cwd ) ;
@@ -23,7 +23,7 @@ export function activate(context: ExtensionContext) {
23
23
context . subscriptions . push ( disposable ) ;
24
24
}
25
25
26
- function list ( ) : Promise < QuickPickItem [ ] > {
26
+ function list ( yo : Yeoman ) : Promise < QuickPickItem [ ] > {
27
27
return new Promise ( resolve => {
28
28
yo . getEnvironment ( ) . lookup ( ( ) => {
29
29
resolve ( yo . getGenerators ( ) . map ( generator => {
You can’t perform that action at this time.
0 commit comments