-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgulpfile.js
44 lines (37 loc) · 917 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
37
38
39
40
41
42
43
44
var gulp = require("gulp"),
gulpcat = require("gulp-concat"),
jshint = require("gulp-jshint");
gulp.task("default", function() {
});
gulp.task("build-tests", function() {
return gulp.src(["csv_parse.js",
"fordeling.js",
"render.js",
"saint_lague.js",
"test/*js"] )
.pipe(gulpcat("test.js"))
.pipe(gulp.dest("test/built/"));
});
gulp.task("test", ["build-tests"], function() {
var mocha = require("gulp-mocha");
return gulp.src(["test/built/*.js"], { read: false })
.pipe(mocha({
reporter: "nyan",
}));
});
gulp.task("clean", function(callback) {
var del = require("del");
del(["test/built/*"], callback);
});
gulp.task("lint", function(callback) {
return gulp.src(["csv_parse.js",
"render.js",
"saint_lague.js",
"fordeling.js",
"app.js",
"more.js",
"test/*.js"])
.pipe(jshint())
.pipe(jshint.reporter("default"));
});
gulp.task("commit", ["lint", "test"]);