forked from Nickersoft/push.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
34 lines (28 loc) · 735 Bytes
/
Copy pathgulpfile.js
File metadata and controls
34 lines (28 loc) · 735 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
var
concat = require('gulp-concat'),
del = require('del'),
gulp = require('gulp'),
path = require('path'),
rename = require('gulp-rename'),
Server = require('karma').Server;
uglify = require('gulp-uglify'),
output_dir = "bin";
gulp.task('clean', function () {
del([output_dir])
});
gulp.task('build', function () {
gulp.src(['push.js'])
.pipe(gulp.dest(output_dir));
gulp.src(['push.js'])
.pipe(uglify({
preserveComments: 'license'
}))
.pipe(rename('push.min.js'))
.pipe(gulp.dest(output_dir));
});
gulp.task('test', function (cb) {
new Server({
configFile: path.resolve('karma.conf.js')
}, cb).start();
});
gulp.task('default', ['build', 'test']);