BVB Source Codes

reactide Show help.js Source code

Return Download reactide: download help.js Source code - Download reactide Source code - Type:.js
  1. /*:nodoc:*
  2.  * class ActionHelp
  3.  *
  4.  * Support action for printing help
  5.  * This class inherided from [[Action]]
  6.  **/
  7. 'use strict';
  8.  
  9. var util = require('util');
  10.  
  11. var Action = require('../action');
  12.  
  13. // Constants
  14. var c  = require('../const');
  15.  
  16. /*:nodoc:*
  17.  * new ActionHelp(options)
  18.  * - options (object): options hash see [[Action.new]]
  19.  *
  20.  **/
  21. var ActionHelp = module.exports = function ActionHelp(options) {
  22.   options = options || {};
  23.   if (options.defaultValue !== null) {
  24.     options.defaultValue = options.defaultValue;
  25.   } else {
  26.     options.defaultValue = c.SUPPRESS;
  27.   }
  28.   options.dest = (options.dest !== null ? options.dest : c.SUPPRESS);
  29.   options.nargs = 0;
  30.   Action.call(this, options);
  31.  
  32. };
  33. util.inherits(ActionHelp, Action);
  34.  
  35. /*:nodoc:*
  36.  * ActionHelp#call(parser, namespace, values, optionString)
  37.  * - parser (ArgumentParser): current parser
  38.  * - namespace (Namespace): namespace for output data
  39.  * - values (Array): parsed values
  40.  * - optionString (Array): input option string(not parsed)
  41.  *
  42.  * Print help and exit
  43.  **/
  44. ActionHelp.prototype.call = function (parser) {
  45.   parser.printHelp();
  46.   parser.exit();
  47. };
  48.  
downloadhelp.js Source code - Download reactide Source code
Related Source Codes/Software:
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
postal - 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top