【发布时间】:2016-02-09 20:32:26
【问题描述】:
在我基于 gulp 的工作流程中,我试图在 tsify 编译之前对所有打字稿文件应用转换:
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();
}
}
但是,tsify 插件似乎忽略了我的插件对源文件所做的任何更改,并使用磁盘上存在的 .ts 文件。生成的包不包含我希望我的转换做出的任何更改。
【问题讨论】:
标签: javascript node.js gulp browserify tsify