In my gulp-based workflow, I am trying to apply a transform to all typescript files before tsify compiles it:
gulp.task(
'deploy-typescript',
function() {
var modulePath = configuration.files.typescript.entry;
var bundleStream = browserify([modulePath])
.transform(includeTemplates)
.plugin(tsify)
.bundle();
return bundleStream
.pipe(sourcestream(configuration.files.typescript.bundle))
.pipe(gulp.dest(configuration.files.typescript.destination));
}
);
var includeTemplates = function(file, options) {
return through(function(buffer, encoding, next) {
this.push('!test!');
next();
}
}
However, it appears that the tsify plugin ignores any changes my plugin makes to the source files and uses the .ts files as they exist on disk. The generated bundle does not include any of the changes I expect my transform to make.