@@ -39,23 +39,21 @@ export default class Generator extends Base {
39
39
genBase ( this ) ;
40
40
41
41
if ( insight . optOut === undefined ) {
42
- insight . askPermission ( null , ( err , optIn ) => {
43
- if ( err || ! optIn ) return cb ( ) ;
44
- insight . track ( 'generatorVersion' , this . rootGeneratorVersion ( ) ) ;
45
- insight . track ( 'node' , process . version ) ;
46
- exec ( 'npm --version' , ( err , stdin , stderr ) => {
47
- if ( err || stderr . length > 0 ) return insight . track ( 'npm' , 'error' ) ;
48
- else return insight . track ( 'npm' , stdin . toString ( ) . trim ( ) ) ;
49
- } ) ;
50
- insight . track ( 'platform' , process . platform ) ;
51
- return cb ( ) ;
52
- } ) ;
42
+ insight . askPermission ( null , cb ) ;
53
43
} else {
54
44
return cb ( ) ;
55
45
}
56
46
} ,
57
47
58
48
info : function ( ) {
49
+ insight . track ( 'generator' , this . rootGeneratorVersion ( ) ) ;
50
+ insight . track ( 'node' , process . version ) ;
51
+ exec ( 'npm --version' , ( err , stdin , stderr ) => {
52
+ if ( err || stderr . length > 0 ) return insight . track ( 'npm' , 'error' ) ;
53
+ else return insight . track ( 'npm' , stdin . toString ( ) . trim ( ) ) ;
54
+ } ) ;
55
+ insight . track ( 'platform' , process . platform ) ;
56
+
59
57
this . log ( this . yoWelcome ) ;
60
58
this . log ( 'Out of the box I create an AngularJS app with an Express server.\n' ) ;
61
59
} ,
0 commit comments