blob: 9e82c232a350ef4b29a8fe97db9409d6fb3f8b24 [file] [log] [blame]
Matteo Scandoloa5d03d52016-07-21 11:35:46 -07001/*eslint-env node */
2(function () {
3
4 'use strict';
5 const gulp = require('gulp');
6 const uglify = require('gulp-uglify');
7 const concat = require('gulp-concat');
8 const wiredep = require('wiredep');
9 const del = require('del');
10
11 module.exports = function(options){
12
13 gulp.task('cleanVendor', function(){
14 return del(
15 [
16 `${options.ngXosVendor}/ngXosVendor.min.js`
17 ],
18 {force: true}
19 );
20 });
21
22 gulp.task('vendor', ['cleanVendor'], function(){
23 const bowerDeps = wiredep().js;
24 return gulp.src(bowerDeps)
25 .pipe(concat('ngXosVendor.min.js'))
26 .pipe(uglify())
27 .pipe(gulp.dest(options.ngXosVendor));
28 });
29 };
30})();