【发布时间】:2015-09-27 10:04:14
【问题描述】:
我正在尝试注释和缩小 systemjs 角度项目。 Systemjs 带有一个构建功能,但它不是“gulp-aware”。可以向构建器传递一个选项来缩小,但没有用于 ng-annotate 的选项,所以我需要 gulp 来代替我做这两个。
gulp.task('bundle', function () {
var options = {}
builder.buildStatic('./assets/app/app.js', options)
.then(function(data) {
console.log("then called");
// make data available for another task
});
如何将以上内容与
结合起来gulp.task('productionApp', function() {
return [source the output from 'bundle']
.pipe(ngannotate())
.pipe(uglify())
.pipe(gulp.dest('./dist'));
});
我可以将第一个任务输出到一个文件中,然后将.src 输入其中,但这不是最好的方法吗?
【问题讨论】:
标签: angularjs gulp systemjs ng-annotate