Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 25 lines (20 sloc) 0.667 kB
69e82e1 CommonJS compatibility + Jakefile to automate building.
Tom Robinson authored
1 var FILE = require("file");
2 var JAKE = require("jake");
3
4 JAKE.task("default", ["Jaml-all.js", "lib/jaml.js"]);
5
6 JAKE.file("Jaml-all.js", ["src/Jaml.js", "src/Node.js", "src/Template.js"], function(t) {
7 concat(t.name(), t.prerequisites());
8 });
9
10 JAKE.task("lib/jaml.js", ["Jaml-all.js", "src/commonjs.js"], function(t) {
11 concat(t.name(), t.prerequisites());
12 });
13
14 function concat(target, sources) {
15 var f = FILE.open(target, "w", { charset : "UTF-8" });
16 try {
17 sources.forEach(function(dep) {
18 FILE.open(dep, "r", { charset : "UTF-8" }).copy(f).close();
19 f.write("\n");
20 });
21 } finally {
22 f.close();
23 }
24 }
Something went wrong with that request. Please try again.