-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathgulpfile.js
More file actions
executable file
·36 lines (26 loc) · 852 Bytes
/
gulpfile.js
File metadata and controls
executable file
·36 lines (26 loc) · 852 Bytes
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
33
34
35
36
var gulp = require('gulp');
var gutil = require('gulp-util');
var uglify = require('gulp-uglify');
var jscs = require('gulp-jscs');
var stylish = require('gulp-jscs-stylish');
var ngAnnotate = require('gulp-ng-annotate');
gulp.task('lint', function() {
gulp.src('./src/notifyme.js')
.pipe(jscs())
.on('error', gutil.noop)
.pipe(stylish());
});
gulp.task('build', ['lint'], function() {
gulp.src('./src/notifyme.js')
.pipe(uglify())
.pipe(gulp.dest('./dist'));
gulp.src('./src/vendor/**/*').pipe(gulp.dest('./dist/vendor/'));
gulp.src('src/angular-notifyme.js')
.pipe(ngAnnotate())
.pipe(uglify())
.pipe(gulp.dest('dist'));
});
gulp.task('watch', function() {
gulp.watch('./src/*.js', ['lint', 'build']);
});
gulp.task('default', ['lint', 'build', 'watch']);