electron 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/History.md CHANGED
@@ -1,4 +1,12 @@
1
1
 
2
+ 0.4.1 / 2014-12-15
3
+ ==================
4
+
5
+ * Merge pull request #7 from RobertWHurst/patch-1
6
+ * Fix broken output in non TTY mode
7
+ * Merge pull request #6 from tunnckoCore/patch-1
8
+ * closes #4, rename displayHelp to showHelp
9
+
2
10
  0.4.0 / 2013-01-21
3
11
  ==================
4
12
 
@@ -253,7 +253,7 @@ Program.prototype.parse = function (args) {
253
253
 
254
254
  argv.cwd = this.opts.cwd;
255
255
  if (argv.mode('help', 'h')) {
256
- displayHelp.call(this);
256
+ this.showHelp();
257
257
  } else if (argv.mode('version', 'v')) {
258
258
  displayVersion.call(this);
259
259
  } else if (!command.length) {
@@ -471,7 +471,7 @@ Program.prototype.colorize = function (noColors) {
471
471
  Object.keys(colors).forEach(function (color) {
472
472
  Object.defineProperty(String.prototype, color,
473
473
  { get: function () {
474
- if (noColors || !self.opts.useColors) return this;
474
+ if (noColors || !self.opts.useColors) return this + '';
475
475
  return '\033[' + colors[color] + 'm' + this + '\033[0m';
476
476
  }
477
477
  , configurable: true
@@ -525,22 +525,22 @@ function mountCommands () {
525
525
  * @api private
526
526
  */
527
527
 
528
- function displayVersion () {
528
+ function displayVersion() {
529
529
  process.stdout.write(this.opts.version + '\n');
530
530
  process.exit();
531
531
  }
532
532
 
533
533
  /*!
534
- * displayHelp ()
534
+ * ### displayHelp()
535
535
  *
536
536
  * Execute the custom help theme or find the respective
537
537
  * electron theme and execute.
538
538
  *
539
539
  * @ctx program
540
- * @api private
540
+ * @api public
541
541
  */
542
542
 
543
- function displayHelp () {
543
+ Program.prototype.showHelp = function () {
544
544
  if ('function' === typeof this.opts.theme)
545
545
  return this.opts.theme.call(this);
546
546
 
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "keywords": [ "cli", "command", "option", "parser", "argv" ],
6
6
  "homepage": "http://alogicalparadox.com/electron",
7
7
  "license": "MIT",
8
- "version": "0.4.0",
8
+ "version": "0.4.1",
9
9
  "repository": {
10
10
  "type": "git",
11
11
  "url": "git://github.com/logicalparadox/electron.git"