meshviewer/gulp/tasks/javascript.js

11 lines
485 B
JavaScript
Raw Permalink Normal View History

2017-03-22 22:13:37 +00:00
module.exports = function (gulp, plugins, config, env) {
return function javascript() {
return gulp.src('app.js')
.pipe(env.development(plugins.sourcemaps.init()))
.pipe(plugins.requirejsOptimize(env.production() ? config.requireJs.prod : config.requireJs.dev))
.pipe(env.production(plugins.uglify({ preserveComments: 'license' })))
.pipe(env.development(plugins.sourcemaps.write('.', { addComment: true })))
.pipe(gulp.dest(config.build));
};
};