2014-12-05 19:26:30 -05:00
|
|
|
var util = require('./util');
|
|
|
|
var gulpTraceur = require('../transpiler/gulp-traceur');
|
|
|
|
var file2moduleName = require('./file2modulename');
|
|
|
|
|
|
|
|
module.exports = function(gulp, plugins, config) {
|
|
|
|
return function() {
|
2015-02-23 20:56:47 -05:00
|
|
|
return gulp.src(config.src)
|
2014-12-05 19:26:30 -05:00
|
|
|
.pipe(plugins.rename({extname: '.'+config.outputExt}))
|
2015-02-23 20:56:47 -05:00
|
|
|
.pipe(util.insertSrcFolder(plugins, config.srcFolderInsertion))
|
2014-12-05 19:26:30 -05:00
|
|
|
.pipe(gulpTraceur(
|
|
|
|
config.options,
|
|
|
|
file2moduleName)
|
|
|
|
)
|
|
|
|
.pipe(gulp.dest(config.dest));
|
|
|
|
};
|
|
|
|
};
|