-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
33 lines (29 loc) · 815 Bytes
/
gulpfile.js
File metadata and controls
33 lines (29 loc) · 815 Bytes
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
"use strict";
if ( typeof require === "undefined" ) { var require = {}; }
var gulp = require("gulp");
var watch = require("gulp-watch");
var rjs = require("gulp-requirejs");
gulp.task("require-build", function(){
rjs({
baseUrl: "./assets/js",
paths: {
"text": "vendor/text",
"jquery": "vendor/jquery",
"knockout": "vendor/knockout",
"komapping": "vendor/komapping",
"data": "../../data/prototype.data.json",
"templates": "../../data/prototype.templates.html"
},
name: "main",
out: "main-built.js"
})
.pipe(gulp.dest("./assets/js/"));
});
gulp.task("watch", function(){
watch(["*.html", "./data/*.{json, html}", "./assets/js/main.js"], function(){
gulp.start("require-build");
});
});
gulp.task("default", function() {
gulp.start(["watch"]);
});