In my gulp-based workflow, I try to apply the conversion 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 seems that the tsify plugin ignores any changes that my plugin makes to the source files, and uses the .ts files as they exist on disk. The generated package does not contain any changes that I expect from my conversion.
source
share