CasperSecurity

Current Path : /usr/share/doc/node-commander/examples/
Upload File :
Current File : //usr/share/doc/node-commander/examples/custom-help-text.js

#!/usr/bin/env node

// This example shows using addHelpText.

// const { Command } = require('commander'); // (normal include)
const { Command } = require('../'); // include commander in git clone of commander repo
const program = new Command();

program.name('awesome');

program
  .addHelpText('beforeAll', 'A W E S O M E\n')
  .addHelpText('afterAll', (context) => {
    if (context.error) {
      return '\nHelp being displayed for an error';
    }
    return '\nSee web site for further help';
  });

program
  .command('extra')
  .addHelpText('before', 'Note: the extra command does not do anything')
  .addHelpText('after', `
Examples:
  awesome extra --help
  awesome help extra`);

program.parse();

// Try the following:
//    node custom-help-text.js --help
//    node custom-help-text.js extra --help
//    node custom-help-text.js
Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY