Jakefile: Put the LIB_DIR existence check & creation at the right place

This commit is contained in:
David Majda 2011-01-25 10:35:48 +01:00
parent 595d3adb82
commit 1a3291fa36

View file

@ -65,12 +65,12 @@ task("build", [], function() {
}).join("\n").replace("@VERSION", PEGJS_VERSION); }).join("\n").replace("@VERSION", PEGJS_VERSION);
} }
fs.writeFileSync(PEGJS_OUT_FILE, preprocess(PEGJS_SRC_FILE), "utf8");
try { try {
fs.statSync(LIB_DIR); fs.statSync(LIB_DIR);
} catch (e) { } catch (e) {
fs.mkdirSync(LIB_DIR, 0755); fs.mkdirSync(LIB_DIR, 0755);
} }
fs.writeFileSync(PEGJS_OUT_FILE, preprocess(PEGJS_SRC_FILE), "utf8");
}); });
task("default", ["build"], function() {}); task("default", ["build"], function() {});