Skip to content

Commit b27f4cf

Browse files
committed
._ file handling
1 parent 9c9116d commit b27f4cf

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.0.3",
2+
"version": "1.0.4",
33
"name": "dotup-typescript-yeoman-generators",
44
"author": {
55
"name": "Peter Ullrich",

src/BaseGenerator.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { IStepQuestion } from './questions/IStepQuestion';
1313
import { Question } from './questions/Question';
1414
import { SharedOptions } from './SharedOptions';
1515
import { GeneratorOptions, IProperty, MethodsToRegister } from './Types';
16+
import { TemplateType } from './project';
1617

1718
export abstract class BaseGenerator<TStep extends string> extends generator {
1819

@@ -394,14 +395,15 @@ export abstract class BaseGenerator<TStep extends string> extends generator {
394395
let ext = path.extname(file.filePath);
395396

396397
// Remove the extension on renamable files
397-
if (ext === '._') {
398-
ext = path.extname(path.basename(file.filePath, '._'));
398+
if (file.typ === TemplateType.removeExtension) {
399+
ext = path.extname(file.targetPath);
399400
}
400401

401402
if (ext === '') {
402403
ext = path.basename(file.filePath);
403404
}
404405

406+
405407
// Skip this file?
406408
if (this.skippedTemplateFiles.includes(file.targetPath)) {
407409
return;

0 commit comments

Comments
 (0)