-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
58 lines (40 loc) · 1.12 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
'use strict';
var gulp = require('gulp');
var gutil = require('gulp-util');
var zip = require('gulp-zopfli');
var rename = require('gulp-rename');
var newer = require('gulp-newer');
var smoosher = require('gulp-smoosher');
gulp.task('default', ['inline'], function() {
gulp.src('./dist/index.html')
.pipe(zip())
.pipe(gulp.dest("./dist/"));
});
gulp.task('inline', function(){
gulp.src('./src/index.html')
.pipe(smoosher())
.pipe(gulp.dest("./dist/"));
});
gulp.task('setupTests', function () {
//Source Files
gulp.src('./src/*.js')
.pipe(newer("./test/"))
.pipe(gulp.dest("./test/"));
gulp.src('./src/*.css')
.pipe(newer("./test/"))
.pipe(gulp.dest("./test/"));
//Libraries
var libs = './test/libs/';
gulp.src('./node_modules/mocha/mocha.js')
.pipe(newer(libs))
.pipe(gulp.dest(libs));
gulp.src('./node_modules/mocha/mocha.css')
.pipe(newer(libs))
.pipe(gulp.dest(libs));
gulp.src('./node_modules/chai/chai.js')
.pipe(newer(libs))
.pipe(gulp.dest(libs));
gulp.src('./node_modules/qunitjs/qunit/*')
.pipe(newer(libs))
.pipe(gulp.dest(libs));
});