mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-26 03:27:18 +00:00
b052e8f50b
So that we get the new colourisation
38 lines
724 B
JavaScript
38 lines
724 B
JavaScript
/*\
|
|
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
|
|
exports.name = "commands";
|
|
exports.platforms = ["node"];
|
|
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) {
|
|
return $tw.utils.error("Error: " + err);
|
|
}
|
|
callback();
|
|
},
|
|
$tw.wiki,
|
|
{output: process.stdout, error: process.stderr}
|
|
);
|
|
commander.execute();
|
|
};
|
|
|
|
})();
|