forked from andersinno/foosball
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
51 lines (42 loc) · 1.43 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
var gulp = require("gulp");
var production = (process.env.NODE_ENV === "production" || process.argv.indexOf("--production") > -1);
// CSS
gulp.task("css:site", require("unigulp/css")({
name: "css:site",
src: "foosball/static_src/less/style.less",
dest: "foosball/static/css/foosball.css",
production,
}));
// JS
gulp.task("js:site", require("unigulp/js")({
name: "js:site",
src: [
"bower_components/jquery/dist/jquery.js",
"bower_components/bootstrap/dist/js/bootstrap.js",
"foosball/static_src/js/foosball.js",
],
dest: "foosball/static/js/foosball.js",
production,
}));
// FONTS
gulp.task("fonts:general", function () {
return gulp.src([
"bower_components/bootstrap/dist/fonts/*.*",
"bower_components/font-awesome/fonts/*.*"
])
.pipe(gulp.dest("foosball/static/fonts"));
});
gulp.task("fonts:lobster", function () {
return gulp.src("bower_components/fontkit-lobster/fonts/lobster/*.*")
.pipe(gulp.dest("foosball/static/fonts/lobster"));
});
gulp.task("css:lobster", function () {
return gulp.src("bower_components/fontkit-lobster/styles/lobster.css")
.pipe(gulp.dest("foosball/static/css"));
});
gulp.task("watch", ["default"], function () {
gulp.watch("foosball/static_src/less/**/*.less", ["css"]);
gulp.watch("foosball/static_src/js/*.js", ["js"]);
});
require("unigulp/cascade")(gulp);
gulp.task("default", ["fonts", "js", "css"]);