mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Add logging functions to commander
This commit is contained in:
parent
6f93ce6ea7
commit
74b0da065e
@ -29,6 +29,24 @@ var Commander = function(commandTokens,callback,wiki,streams) {
|
||||
this.outputPath = path.resolve($tw.boot.wikiPath,$tw.config.wikiOutputSubDir);
|
||||
};
|
||||
|
||||
/*
|
||||
Log a string if verbose flag is set
|
||||
*/
|
||||
Commander.prototype.log = function(str) {
|
||||
if(this.verbose) {
|
||||
this.streams.output.write(str + "\n");
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Write a string if verbose flag is set
|
||||
*/
|
||||
Commander.prototype.write = function(str) {
|
||||
if(this.verbose) {
|
||||
this.streams.output.write(str);
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Add a string of tokens to the command queue
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user