2015-04-02 22:53:11 -04:00
|
|
|
var gulp = require('gulp');
|
|
|
|
var concat = require('gulp-concat');
|
|
|
|
var replace = require('gulp-replace');
|
|
|
|
var insert = require('gulp-insert');
|
|
|
|
|
2015-03-23 16:18:05 -04:00
|
|
|
module.exports.bundle = function(buildConfig, moduleName, outputFile, outputConfig){
|
|
|
|
// loading it earlier interfers with custom traceur.
|
|
|
|
var Builder = require('systemjs-builder');
|
|
|
|
var builder = new Builder();
|
|
|
|
builder.config(buildConfig);
|
|
|
|
return builder.build(moduleName, outputFile, outputConfig);
|
|
|
|
}
|
2015-04-02 22:53:11 -04:00
|
|
|
|
|
|
|
|
|
|
|
module.exports.modify = function(srcs, concatName) {
|
|
|
|
return gulp.src(srcs)
|
|
|
|
.pipe(concat(concatName))
|
|
|
|
.pipe(replace('use strict', '')) // remove after https://github.com/systemjs/builder/issues/123 is fixed.
|
|
|
|
.pipe(replace('sourceMappingURL', 'sourceMappingURLDisabled')) // TODO: add concat for sourceMaps
|
|
|
|
}
|