forked from ng-milk/angular-sticky-navigation-directive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
32 lines (26 loc) · 758 Bytes
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
'use strict';
var del = require('del'),
gulp = require('gulp'),
gulpsync = require('gulp-sync')(gulp),
uglify = require('gulp-uglify'),
rename = require('gulp-rename'),
eslint = require('gulp-eslint');
var options = {
src: 'src',
dist: 'dist'
};
gulp.task('scripts', function () {
return gulp.src([options.src + '/**/*.js'])
.pipe(eslint())
.pipe(uglify())
.pipe(rename('ng-sticky.js'))
.pipe(gulp.dest(options.dist));
});
gulp.task('clean', function (cb){
return del([options.dist], cb);
});
gulp.task('watch', function () {
return gulp.watch([options.src + '/**/*'], ['build']);
});
gulp.task('default', gulpsync.sync([['build'], ['watch']]));
gulp.task('build', gulpsync.sync([['clean'], ['scripts']]));