@@ -19,14 +19,14 @@ export default class AnalyticsTemplateGenerator extends SfdxGenerator<AnalyticsT
19
19
public validateOptions ( ) : void {
20
20
CreateUtil . checkInputs ( this . options . templatename ) ;
21
21
22
- const fileparts = path . resolve ( this . options . outputdir ) . split ( path . sep ) ;
22
+ const fileparts = path . resolve ( this . outputdir ) . split ( path . sep ) ;
23
23
if ( ! fileparts . includes ( 'waveTemplates' ) ) {
24
24
throw new Error ( nls . localize ( 'MissingWaveTemplatesDir' ) ) ;
25
25
}
26
26
}
27
27
28
28
public writing ( ) : void {
29
- const { outputdir , templatename, apiversion } = this . options ;
29
+ const { templatename } = this . options ;
30
30
// tslint:disable-next-line:no-unused-expression
31
31
this . fs . copyTpl (
32
32
this . templatePath (
@@ -38,7 +38,7 @@ export default class AnalyticsTemplateGenerator extends SfdxGenerator<AnalyticsT
38
38
) ,
39
39
this . destinationPath (
40
40
path . join (
41
- outputdir ,
41
+ this . outputdir ,
42
42
templatename ,
43
43
'dashboards' ,
44
44
templatename + 'Dashboard.json'
@@ -51,21 +51,23 @@ export default class AnalyticsTemplateGenerator extends SfdxGenerator<AnalyticsT
51
51
path . join ( 'DefaultAnalyticsTemplate' , 'app-to-template-rules.json' )
52
52
) ,
53
53
this . destinationPath (
54
- path . join ( outputdir , templatename , 'app-to-template-rules.json' )
54
+ path . join ( this . outputdir , templatename , 'app-to-template-rules.json' )
55
55
) ,
56
56
{ }
57
57
) ;
58
58
this . fs . copyTpl (
59
59
this . templatePath ( path . join ( 'DefaultAnalyticsTemplate' , 'folder.json' ) ) ,
60
- this . destinationPath ( path . join ( outputdir , templatename , 'folder.json' ) ) ,
60
+ this . destinationPath (
61
+ path . join ( this . outputdir , templatename , 'folder.json' )
62
+ ) ,
61
63
{ templateName : templatename }
62
64
) ;
63
65
this . fs . copyTpl (
64
66
this . templatePath (
65
67
path . join ( 'DefaultAnalyticsTemplate' , 'releaseNotes.html' )
66
68
) ,
67
69
this . destinationPath (
68
- path . join ( outputdir , templatename , 'releaseNotes.html' )
70
+ path . join ( this . outputdir , templatename , 'releaseNotes.html' )
69
71
) ,
70
72
{ }
71
73
) ;
@@ -74,33 +76,33 @@ export default class AnalyticsTemplateGenerator extends SfdxGenerator<AnalyticsT
74
76
path . join ( 'DefaultAnalyticsTemplate' , 'template-info.json' )
75
77
) ,
76
78
this . destinationPath (
77
- path . join ( outputdir , templatename , 'template-info.json' )
79
+ path . join ( this . outputdir , templatename , 'template-info.json' )
78
80
) ,
79
81
{
80
82
templateName : templatename ,
81
- sourceApiVersion : apiversion ,
83
+ sourceApiVersion : this . apiversion ,
82
84
}
83
85
) ;
84
86
this . fs . copyTpl (
85
87
this . templatePath (
86
88
path . join ( 'DefaultAnalyticsTemplate' , 'template-to-app-rules.json' )
87
89
) ,
88
90
this . destinationPath (
89
- path . join ( outputdir , templatename , 'template-to-app-rules.json' )
91
+ path . join ( this . outputdir , templatename , 'template-to-app-rules.json' )
90
92
) ,
91
93
{ }
92
94
) ;
93
95
this . fs . copyTpl (
94
96
this . templatePath ( path . join ( 'DefaultAnalyticsTemplate' , 'ui.json' ) ) ,
95
- this . destinationPath ( path . join ( outputdir , templatename , 'ui.json' ) ) ,
97
+ this . destinationPath ( path . join ( this . outputdir , templatename , 'ui.json' ) ) ,
96
98
{ }
97
99
) ;
98
100
this . fs . copyTpl (
99
101
this . templatePath (
100
102
path . join ( 'DefaultAnalyticsTemplate' , 'variables.json' )
101
103
) ,
102
104
this . destinationPath (
103
- path . join ( outputdir , templatename , 'variables.json' )
105
+ path . join ( this . outputdir , templatename , 'variables.json' )
104
106
) ,
105
107
{ }
106
108
) ;
0 commit comments