@@ -96,20 +96,35 @@ module.exports.commonFilesWriter = (generator, templatePath) => {
96
96
) ;
97
97
98
98
// gen the deployment/Templates folder
99
- const deploymentFolder = 'deploymentTemplates' ;
99
+ const deploymentFolders = [ 'deploymentTemplates/deployUseExistResourceGroup' , 'deploymentTemplates/deployWithNewResourceGroup' ] ;
100
100
const deploymentFiles = [
101
- 'template-with-new-rg.json' ,
102
- 'template-with-preexisting-rg.json' ,
103
- 'new-rg-parameters.json' ,
104
- 'preexisting-rg-parameters.json' ,
101
+ [
102
+ 'parameters-for-template-AzureBot-with-rg.json' ,
103
+ 'parameters-for-template-BotApp-with-rg.json' ,
104
+ 'readme.md' ,
105
+ 'template-AzureBot-with-rg.json' ,
106
+ 'template-BotApp-with-rg.json' ,
107
+ ] ,
108
+ [
109
+ 'parameters-for-template-AzureBot-new-rg.json' ,
110
+ 'parameters-for-template-BotApp-new-rg.json' ,
111
+ 'readme.md' ,
112
+ 'template-AzureBot-new-rg.json' ,
113
+ 'template-BotApp-new-rg.json' ,
114
+ ]
105
115
] ;
106
- mkdirp . sync ( deploymentFolder ) ;
107
- const sourcePath = path . join ( templatePath , deploymentFolder ) ;
108
- const destinationPath = path . join ( generator . destinationPath ( ) , deploymentFolder ) ;
109
- for ( let cnt = 0 ; cnt < deploymentFiles . length ; ++ cnt ) {
110
- generator . fs . copy (
111
- path . join ( sourcePath , deploymentFiles [ cnt ] ) ,
112
- path . join ( destinationPath , deploymentFiles [ cnt ] ) ,
113
- ) ;
116
+
117
+ for ( let i = 0 ; i < deploymentFolders . length ; i ++ ) {
118
+ const deploymentFolder = deploymentFolders [ i ] ;
119
+ mkdirp . sync ( deploymentFolder ) ;
120
+ const sourcePath = path . join ( templatePath , deploymentFolder ) ;
121
+ const destinationPath = path . join ( generator . destinationPath ( ) , deploymentFolder ) ;
122
+
123
+ for ( let cnt = 0 ; cnt < deploymentFiles [ i ] . length ; ++ cnt ) {
124
+ generator . fs . copy (
125
+ path . join ( sourcePath , deploymentFiles [ i ] [ cnt ] ) ,
126
+ path . join ( destinationPath , deploymentFiles [ i ] [ cnt ] ) ,
127
+ ) ;
128
+ }
114
129
}
115
130
}
0 commit comments