@@ -174,17 +174,17 @@ export class LangiumGenerator extends Generator {
174
174
const referencedTsconfigBaseName = this . answers . includeTest ? 'tsconfig.src.json' : 'tsconfig.json' ;
175
175
const templateCopyOptions : CopyOptions = {
176
176
process : content => this . _replaceTemplateWords ( fileExtensionGlob , languageName , languageId , referencedTsconfigBaseName , content ) ,
177
- processDestinationPath : path => this . _replaceTemplateNames ( languageId , path )
177
+ processDestinationPath : destPath => this . _replaceTemplateNames ( languageId , destPath )
178
178
} ;
179
179
180
180
this . sourceRoot ( path . join ( __dirname , TEMPLATE_CORE_DIR ) ) ;
181
181
const pkgJson = this . fs . readJSON ( path . join ( this . sourceRoot ( ) , '.package.json' ) ) ;
182
182
this . fs . extendJSON ( this . _extensionPath ( 'package-template.json' ) , pkgJson , undefined , 4 ) ;
183
183
184
- for ( const path of [ '.' , '.vscode' , 'eslint.config.mjs' ] ) {
184
+ for ( const pathElement of [ '.' , '.vscode' , 'eslint.config.mjs' ] ) {
185
185
this . fs . copy (
186
- this . templatePath ( path ) ,
187
- this . _extensionPath ( path ) ,
186
+ this . templatePath ( pathElement ) ,
187
+ this . _extensionPath ( pathElement ) ,
188
188
templateCopyOptions
189
189
) ;
190
190
}
@@ -197,10 +197,10 @@ export class LangiumGenerator extends Generator {
197
197
const pkgJson = this . fs . readJSON ( path . join ( this . sourceRoot ( ) , '.package.json' ) ) ;
198
198
this . fs . extendJSON ( this . _extensionPath ( 'package-template.json' ) , pkgJson , undefined , 4 ) ;
199
199
this . sourceRoot ( path . join ( __dirname , TEMPLATE_VSCODE_DIR ) ) ;
200
- for ( const path of [ '.' , '.vscode' , '.vscodeignore' ] ) {
200
+ for ( const pathElement of [ '.' , '.vscode' , '.vscodeignore' ] ) {
201
201
this . fs . copy (
202
- this . templatePath ( path ) ,
203
- this . _extensionPath ( path ) ,
202
+ this . templatePath ( pathElement ) ,
203
+ this . _extensionPath ( pathElement ) ,
204
204
templateCopyOptions
205
205
) ;
206
206
}
@@ -210,10 +210,10 @@ export class LangiumGenerator extends Generator {
210
210
this . sourceRoot ( path . join ( __dirname , TEMPLATE_CLI_DIR ) ) ;
211
211
const pkgJson = this . fs . readJSON ( path . join ( this . sourceRoot ( ) , '.package.json' ) ) ;
212
212
this . fs . extendJSON ( this . _extensionPath ( 'package-template.json' ) , pkgJson , undefined , 4 ) ;
213
- for ( const path of [ '.' ] ) {
213
+ for ( const pathElement of [ '.' ] ) {
214
214
this . fs . copy (
215
- this . templatePath ( path ) ,
216
- this . _extensionPath ( path ) ,
215
+ this . templatePath ( pathElement ) ,
216
+ this . _extensionPath ( pathElement ) ,
217
217
templateCopyOptions
218
218
) ;
219
219
}
@@ -224,10 +224,10 @@ export class LangiumGenerator extends Generator {
224
224
const pkgJson = this . fs . readJSON ( path . join ( this . sourceRoot ( ) , '.package.json' ) ) ;
225
225
this . fs . extendJSON ( this . _extensionPath ( 'package-template.json' ) , pkgJson , undefined , 4 ) ;
226
226
this . sourceRoot ( path . join ( __dirname , TEMPLATE_WEB_DIR ) ) ;
227
- for ( const path of [ '.' ] ) {
227
+ for ( const pathElement of [ '.' ] ) {
228
228
this . fs . copy (
229
- this . templatePath ( path ) ,
230
- this . _extensionPath ( path ) ,
229
+ this . templatePath ( pathElement ) ,
230
+ this . _extensionPath ( pathElement ) ,
231
231
templateCopyOptions
232
232
) ;
233
233
}
@@ -306,8 +306,8 @@ export class LangiumGenerator extends Generator {
306
306
}
307
307
}
308
308
309
- _extensionPath ( ...path : string [ ] ) : string {
310
- return this . destinationPath ( USER_DIR , this . answers . extensionName , ...path ) ;
309
+ _extensionPath ( ...pathElement : string [ ] ) : string {
310
+ return this . destinationPath ( USER_DIR , this . answers . extensionName , ...pathElement ) ;
311
311
}
312
312
313
313
_replaceTemplateWords ( fileExtensionGlob : string , languageName : string , languageId : string , tsconfigBaseName : string , content : string | Buffer ) : string {
@@ -322,8 +322,8 @@ export class LangiumGenerator extends Generator {
322
322
. replace ( NEWLINES , EOL ) ;
323
323
}
324
324
325
- _replaceTemplateNames ( languageId : string , path : string ) : string {
326
- return path . replace ( LANGUAGE_PATH_ID , languageId ) ;
325
+ _replaceTemplateNames ( languageId : string , inputPath : string ) : string {
326
+ return inputPath . replace ( LANGUAGE_PATH_ID , languageId ) ;
327
327
}
328
328
}
329
329
0 commit comments