Skip to content

Commit 457ed1a

Browse files
Fixed duplicate outout content
1 parent b6015f8 commit 457ed1a

2 files changed

Lines changed: 11 additions & 9 deletions

File tree

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ npm install --save-dev @fluffy-spoon/csharp-to-typescript-generator.webpack
55

66
# Use
77
```javascript
8-
var gulp = require('gulp');
98
var poco = require('@fluffy-spoon/csharp-to-typescript-generator.webpack');
109

1110
var webpackConfig = {

src/Index.ts

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,17 @@ Plugin.prototype.apply = function(compiler) {
4848
.join(
4949
that.outputDirectory,
5050
fileName.substring(0, fileName.length - 2) + that.extension);
51-
compilation.assets[outputFilePath] = {
52-
source: function() {
53-
return typescriptCode;
54-
},
55-
size: function() {
56-
return typescriptCode.length;
57-
}
58-
};
51+
52+
(function (outputPath, ts) {
53+
compilation.assets[outputPath] = {
54+
source: function() {
55+
return ts;
56+
},
57+
size: function() {
58+
return ts.length;
59+
}
60+
};
61+
})(outputFilePath, typescriptCode);
5962
}
6063

6164
callback();

0 commit comments

Comments
 (0)