-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGulpfile.js
32 lines (29 loc) · 862 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
var gulp = require('gulp'),
concat = require('gulp-concat'),
lint = require('gulp-jslint'),
uglify = require('gulp-uglify'),
ngAnnotate = require('gulp-ng-annotate'),
del = require('del'),
SOURCES = 'src/**/*.js';
gulp.task('cleanDist', function (cb) {
del(['dist/*'], cb);
});
gulp.task('build', ['lint', 'cleanDist'], function () {
return gulp.src(['src/angular-error-logger-module.js', SOURCES])
.pipe(ngAnnotate())
.pipe(concat('angular-error-logger.js'))
.pipe(uglify())
.pipe(gulp.dest('dist'));
});
gulp.task('lint', function () {
return gulp.src(SOURCES)
.pipe(lint({
global: ['angular'],
browser: true,
devel: true,
todo: true,
noempty: false,
plusplus: true,
unparam: true
}));
});