1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-24 17:10:29 +00:00

add noclean parameter

deletes directory by default
This commit is contained in:
James Welford Anderson 2015-01-11 06:44:56 +09:00
parent 3657bbe920
commit ddb8daa15a

View File

@ -38,8 +38,11 @@ Command.prototype.execute = function() {
pathname = path.resolve(this.commander.outputPath,this.params[2]),
type = this.params[3] || "text/html",
extension = this.params[4] || ".html",
deletedirectory = (this.params[5] || "") != "noclean",
tiddlers = wiki.filterTiddlers(filter);
$tw.utils.deleteDirectory(pathname);
if(deletedirectory){
$tw.utils.deleteDirectory(pathname);
}
$tw.utils.createDirectory(pathname);
$tw.utils.each(tiddlers,function(title) {
var parser = wiki.parseTiddler(template),