index.js 798 B

123456789101112131415161718192021222324252627
  1. const { Argument } = require('./lib/argument.js');
  2. const { Command } = require('./lib/command.js');
  3. const { CommanderError, InvalidArgumentError } = require('./lib/error.js');
  4. const { Help } = require('./lib/help.js');
  5. const { Option } = require('./lib/option.js');
  6. // @ts-check
  7. /**
  8. * Expose the root command.
  9. */
  10. exports = module.exports = new Command();
  11. exports.program = exports; // More explicit access to global command.
  12. // Implicit export of createArgument, createCommand, and createOption.
  13. /**
  14. * Expose classes
  15. */
  16. exports.Argument = Argument;
  17. exports.Command = Command;
  18. exports.CommanderError = CommanderError;
  19. exports.Help = Help;
  20. exports.InvalidArgumentError = InvalidArgumentError;
  21. exports.InvalidOptionArgumentError = InvalidArgumentError; // Deprecated
  22. exports.Option = Option;