forked from aullman/opentok-layout-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
42 lines (40 loc) · 1.2 KB
/
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
37
38
39
40
41
42
var gulp = require('gulp'),
jshint = require('gulp-jshint'),
rename = require('gulp-rename'),
uglify = require('gulp-uglify'),
Server = require('karma').Server;
gulp.task('default', function(){
gulp.src('./opentok-layout.js')
.pipe(jshint())
.pipe(uglify({preserveComments: "some"}))
.pipe(rename('opentok-layout.min.js'))
.pipe(gulp.dest('./'));
});
gulp.task('test', function (done) {
// Run tests without jQuery
new Server({
configFile: __dirname + '/karma.conf.js',
browsers: ['Firefox'],
// list of files / patterns to load in the browser
files: [
'https://static.opentok.com/v2/js/opentok.js',
'opentok-layout.js',
'tests/**/*spec.js'
],
singleRun: true
}, function () {
// Run tests with jQuery
new Server({
configFile: __dirname + '/karma.conf.js',
browsers: ['Firefox'],
// list of files / patterns to load in the browser
files: [
'https://static.opentok.com/v2/js/opentok.js',
'https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js',
'opentok-layout.js',
'tests/**/*spec.js'
],
singleRun: true
}, done).start();
}).start();
});