-
Notifications
You must be signed in to change notification settings - Fork 108
/
gulpfile.js
36 lines (33 loc) · 916 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
33
34
35
36
var gulp = require('gulp');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var connect = require('gulp-connect');
var watch = require('gulp-watch');
var colors = require('colors');
gulp.task('build', function() {
gulp.src([
'./src/js/delegate-service.js',
'./src/js/pdf-viewer-delegate.js',
'./src/js/pdf-ctrl.js',
'./src/js/pdf-viewer-toolbar.js',
'./src/js/pdf-viewer.js'
])
.pipe(concat('angular-pdf-viewer.min.js'))
.pipe(uglify())
.pipe(gulp.dest('./dist/'));
});
gulp.task('dev', function() {
// Start a server
connect.server({
root: '',
port: 3000,
livereload: true
});
console.log('[CONNECT] Listening on port 3000'.yellow.inverse);
// Watch HTML files for changes
console.log('[CONNECT] Watching HTML, JS and CSS files for live-reload'.blue);
watch({
glob: ['./src/**/*.*']
})
.pipe(connect.reload());
});