1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-18 07:44:51 +00:00
TiddlyWiki5/core/modules/startup/commands.js

38 lines
713 B
JavaScript
Raw Normal View History

/*\
2014-05-05 14:25:51 +00:00
title: $:/core/modules/startup/commands.js
type: application/javascript
module-type: startup
Command processing
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
// Export name and synchronous status
2014-05-05 14:25:51 +00:00
exports.name = "commands";
exports.platforms = ["node"];
2014-05-05 14:25:51 +00:00
exports.after = ["story"];
exports.synchronous = false;
exports.startup = function(callback) {
// On the server, start a commander with the command line arguments
var commander = new $tw.Commander(
$tw.boot.argv,
function(err) {
if(err) {
console.log("Error: " + err);
}
callback();
},
$tw.wiki,
{output: process.stdout, error: process.stderr}
);
commander.execute();
};
})();