diff --git a/panel/scripts/transformers/babel.js b/panel/scripts/transformers/babel.js index f780b5c..1d0302b 100644 --- a/panel/scripts/transformers/babel.js +++ b/panel/scripts/transformers/babel.js @@ -1,7 +1,7 @@ function Babel() { Transformer.call(this); - this.name = 'Babel'; + this.name = 'Babel (' + this.getVersion() + ')'; this.handle = 'babel'; this.runtimePath = 'node_modules/babel/browser-polyfill.js'; this.opts = { @@ -17,4 +17,8 @@ Babel.prototype.transform = function(input) { return babel.transform(input, this.opts).code; } +Babel.prototype.getVersion = function() { + return babel.version; +} + var babelTransformer = new Babel(); diff --git a/panel/scripts/transformers/coffee.js b/panel/scripts/transformers/coffee.js index 46f978b..509e14b 100644 --- a/panel/scripts/transformers/coffee.js +++ b/panel/scripts/transformers/coffee.js @@ -1,7 +1,7 @@ function Coffee() { Transformer.call(this); - this.name = 'CoffeeScript'; + this.name = 'CoffeeScript (' + this.getVersion() + ')'; this.handle = 'coffee-script'; this.opts = { bare: true @@ -16,4 +16,8 @@ Coffee.prototype.transform = function(input) { return CoffeeScript.compile(input, this.opts); } +Coffee.prototype.getVersion = function() { + return CoffeeScript.VERSION; +} + var coffeeTransformer = new Coffee(); diff --git a/panel/scripts/transformers/traceur.js b/panel/scripts/transformers/traceur.js index 2630c72..d7a63f0 100644 --- a/panel/scripts/transformers/traceur.js +++ b/panel/scripts/transformers/traceur.js @@ -1,7 +1,7 @@ function Traceur() { Transformer.call(this); - this.name = 'Traceur'; + this.name = 'Traceur (' + this.getVersion() + ')'; this.handle = 'traceur'; this.runtimePath = 'node_modules/traceur/bin/traceur-runtime.js'; } @@ -18,4 +18,9 @@ Traceur.prototype.transform = function(input) { return traceur.Compiler.script(input); } +Traceur.prototype.getVersion = function() { + var loader = new traceur.runtime.TraceurLoader(); + return loader.version.split('@')[1]; +} + var traceurTransformer = new Traceur();