systemjs 角度プロジェクトに注釈を付けて縮小しようとしています。Systemjs にはビルド機能が付属していますが、「gulp 対応」ではありません。縮小するオプションをビルダーに渡す可能性がありますが、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
をファイルに出力することもできますが、それが最善の方法ではないでしょうか?