2012-05-02 10:02:47 +00:00
|
|
|
/*\
|
2012-05-03 20:47:16 +00:00
|
|
|
title: $:/core/modules/commands/version.js
|
2012-05-02 10:02:47 +00:00
|
|
|
type: application/javascript
|
|
|
|
module-type: command
|
|
|
|
|
2012-05-02 14:02:58 +00:00
|
|
|
Version command
|
2012-05-02 10:02:47 +00:00
|
|
|
|
|
|
|
\*/
|
|
|
|
(function(){
|
|
|
|
|
|
|
|
/*jslint node: true, browser: true */
|
2012-05-04 17:49:04 +00:00
|
|
|
/*global $tw: false */
|
2012-05-02 10:02:47 +00:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
exports.info = {
|
|
|
|
name: "version",
|
2012-05-02 16:26:36 +00:00
|
|
|
synchronous: true
|
2012-05-04 17:49:04 +00:00
|
|
|
};
|
2012-05-02 10:02:47 +00:00
|
|
|
|
|
|
|
var Command = function(params,commander) {
|
|
|
|
this.params = params;
|
|
|
|
this.commander = commander;
|
|
|
|
};
|
|
|
|
|
|
|
|
Command.prototype.execute = function() {
|
2012-07-13 16:38:23 +00:00
|
|
|
this.commander.streams.output.write($tw.version + "\n");
|
2012-05-02 14:02:58 +00:00
|
|
|
return null; // No error
|
2012-05-04 17:49:04 +00:00
|
|
|
};
|
2012-05-02 10:02:47 +00:00
|
|
|
|
|
|
|
exports.Command = Command;
|
|
|
|
|
|
|
|
})();
|