-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
37 lines (32 loc) · 946 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
var gulp = require("gulp"),
jasmine = require("gulp-jasmine"),
header = require("gulp-header"),
concat = require("gulp-concat"),
uglify = require("gulp-uglify"),
pkg = require("./package.json");
var d = new Date();
var releaseDate = d.getDate() + "-" + (d.getMonth() + 1) + "-" + d.getFullYear()
var fileStack = [
"src/setup.js",
"src/behavior_lab.js",
"src/boundary_lab.js",
"src/controller_lab.js",
"src/helper_lab.js",
"src/dom_lab.js"
];
var banner = [
"// Stik-labs - Version: <%= pkg.version %> | From: <%= date %>\n",
""].join("\n");
gulp.task("test", function(){
gulp.src("specs/*_spec.js")
.pipe(jasmine());
});
gulp.task("pack", function(){
gulp.src(fileStack)
.pipe(concat("stik-labs.js"))
.pipe(header(banner, { pkg: pkg, date: releaseDate }))
.pipe(gulp.dest("dist"))
.pipe(concat("stik-labs.min.js"))
.pipe(uglify())
.pipe(gulp.dest("dist"));
});