1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-11-13 05:47:17 +00:00

Add --build command

First pass at the build system described in #356.

To test it, move to a new, empty directory and try `tiddlywiki
editions/tw5.com --verbose --build`
This commit is contained in:
Jermolene
2014-04-25 22:41:59 +01:00
parent 552657fc58
commit f7e50e0950
22 changed files with 292 additions and 40 deletions

View File

@@ -31,8 +31,9 @@ Command.prototype.execute = function() {
fs = require("fs"),
path = require("path"),
title = this.params[0],
filename = this.params[1],
filename = path.resolve(this.commander.outputPath,this.params[1]),
type = this.params[2] || "text/html";
$tw.utils.createFileDirectories(filename);
fs.writeFile(filename,this.commander.wiki.renderTiddler(type,title),"utf8",function(err) {
self.callback(err);
});