blob: 407d70eea15be26ca7e3335ddba35facfd074d06 [file] [log] [blame]
Matteo Scandolo2b626742015-11-04 16:03:59 +01001var gulp = require('gulp');
2var uglify = require('gulp-uglify');
Matteo Scandolo57404dc2016-04-13 16:20:13 -07003var concat = require('gulp-concat');
Matteo Scandolo2b626742015-11-04 16:03:59 +01004var ngAnnotate = require('gulp-ng-annotate');
5var angularFilesort = require('gulp-angular-filesort');
Matteo Scandolo57404dc2016-04-13 16:20:13 -07006var gulpDocs = require('gulp-ngdocs');
Matteo Scandolo2b626742015-11-04 16:03:59 +01007
8module.exports = function(options){
9 gulp.task('helpers', function(){
10 return gulp.src([options.xosHelperSource + '**/*.js'])
11 .pipe(angularFilesort())
12 .pipe(concat('ngXosHelpers.js'))
13 .pipe(ngAnnotate())
14 .pipe(uglify())
15 .pipe(gulp.dest(options.ngXosVendor));
16 });
Matteo Scandolo57404dc2016-04-13 16:20:13 -070017
18 gulp.task('docs', function(){
19 return gulp.src(options.xosHelperSource + '**/*.js')
20 .pipe(gulpDocs.process({
21 title: 'XOS Helpers Module',
22 scripts: [
23 'http://ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular.min.js',
24 'http://ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular-animate.min.js'
25 ]
26 }))
27 .pipe(gulp.dest('./docs'));
28 });
Matteo Scandolo2b626742015-11-04 16:03:59 +010029};