blob: 9e82c232a350ef4b29a8fe97db9409d6fb3f8b24 [file] [log] [blame]
/*eslint-env node */
(function () {
'use strict';
const gulp = require('gulp');
const uglify = require('gulp-uglify');
const concat = require('gulp-concat');
const wiredep = require('wiredep');
const del = require('del');
module.exports = function(options){
gulp.task('cleanVendor', function(){
return del(
[
`${options.ngXosVendor}/ngXosVendor.min.js`
],
{force: true}
);
});
gulp.task('vendor', ['cleanVendor'], function(){
const bowerDeps = wiredep().js;
return gulp.src(bowerDeps)
.pipe(concat('ngXosVendor.min.js'))
.pipe(uglify())
.pipe(gulp.dest(options.ngXosVendor));
});
};
})();