Command

Supports command line interface

Parameters

(None)

Returns

(Nothing)
(defined in /src/command/index.ts:11)
public static run(argv: string[]) {
    const command = argv[2];
    if (!command) {
      console.log('Usage: cormo <command>');
      return;
    }
    try {
      // tslint:disable-next-line:variable-name
      const CommandClass = require(path.resolve(__dirname, '..', 'command', command));
      const runner = new CommandClass(argv);
      return runner.run();
    } catch (error) {
      console.log(`Cannot find a CORMO command ${command}`);
    }
  }
Fork me on GitHub