Skip to content

Commit 5df98cd

Browse files
authored
Update Index.ts
1 parent 7a88a6c commit 5df98cd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ function Plugin(outputDirectory: string, paths: string[]|string, options: EmitOp
2323
if(outputDirectory.startsWith(process.cwd()))
2424
outputDirectory = outputDirectory.substr(process.cwd().length + 1);
2525

26+
this.extension = extension;
2627
this.outputDirectory = outputDirectory;
2728
this.paths = newPaths;
2829
this.options = options;
@@ -39,12 +40,11 @@ Plugin.prototype.apply = function(compiler) {
3940
var emitter = new Emitter(csharpCode);
4041
var typescriptCode = emitter.emit(that.options);
4142

42-
var suffix = "d.ts";
4343
var fileName = path.basename(filePath);
4444
var outputFilePath = path
4545
.join(
4646
that.outputDirectory,
47-
fileName.substring(0, fileName.length - 2) + suffix);
47+
fileName.substring(0, fileName.length - 2) + that.extension);
4848
compilation.assets[outputFilePath] = {
4949
source: function() {
5050
return typescriptCode;

0 commit comments

Comments
 (0)