Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

35 lines (30 sloc) 1.277 kb
desc("runs build");
task("default", ["build"], function () {});
desc("combines the source files");
task("build", [], function () {
console.log("building Alice.js ...");
var fs = require('fs'),
zlib = require('zlib'),
gzip = zlib.createGzip(),
ginp = "",
gout = '',
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: build/alice.js");
fs.writeFileSync("build/alice.js", output);
console.log("minifying: build/alice.min.js");
childProcess.exec("uglifyjs build/alice.js > build/alice.min.js", complete);
console.log("gzipping: build/alice.min.js");
setTimeout(function(){
ginp = fs.createReadStream('build/alice.min.js');
gout = fs.createWriteStream('build/alice.min.js.gz');
ginp.pipe(gzip).pipe(gout);
console.log("Build Complete.");
}, 2000);
}, true);
Jump to Line
Something went wrong with that request. Please try again.