forked from blackberry/Alice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJakefile
24 lines (19 loc) · 872 Bytes
/
Jakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
desc("runs build");
task("default", ["build"], function () {});
desc("combines the source files");
task("build", [], function () {
console.log("building Alice.js ...");
var fs = require('fs'),
childProcess = require('child_process'),
output = "";
console.log(" - including alice.core.js");
output += fs.readFileSync("src/alice.core.js", "utf-8");
console.log(" - including alice.plugins.cheshire.js");
output += fs.readFileSync("src/alice.plugins.cheshire.js", "utf-8");
console.log(" - including alice.plugins.caterpillar.js");
output += fs.readFileSync("src/alice.plugins.caterpillar.js", "utf-8");
console.log("writing: js/alice.js");
fs.writeFileSync("js/alice.js", output);
console.log("minifying: js/alice-min.js");
childProcess.exec("uglifyjs js/alice.js > js/alice-min.js", complete);
}, true);