mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-22 05:50:01 +00:00

This commit adds support for dynamic tokens within build commands. See the tiddlywiki.info file. Also adds an echo command to make debugging easier. I also intend to add a node type for prompting the user for a string.
33 lines
551 B
JavaScript
33 lines
551 B
JavaScript
/*\
|
|
title: $:/core/modules/commands/echo.js
|
|
type: application/javascript
|
|
module-type: command
|
|
|
|
Command to echo input parameters
|
|
|
|
\*/
|
|
(function(){
|
|
|
|
/*jslint node: true, browser: true */
|
|
/*global $tw: false */
|
|
"use strict";
|
|
|
|
exports.info = {
|
|
name: "echo",
|
|
synchronous: true
|
|
};
|
|
|
|
var Command = function(params,commander) {
|
|
this.params = params;
|
|
this.commander = commander;
|
|
};
|
|
|
|
Command.prototype.execute = function() {
|
|
this.commander.streams.output.write(JSON.stringify(this.params,null,4) + "\n");
|
|
return null;
|
|
};
|
|
|
|
exports.Command = Command;
|
|
|
|
})();
|