index.js 488 B

1234567891011121314151617
  1. #!/usr/bin/env node
  2. "use strict";
  3. var _options = _interopRequireDefault(require("./options"));
  4. var _dir = _interopRequireDefault(require("./dir"));
  5. var _file = _interopRequireDefault(require("./file"));
  6. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  7. const opts = (0, _options.default)(process.argv);
  8. const fn = opts.cliOptions.outDir ? _dir.default : _file.default;
  9. fn(opts).catch(err => {
  10. console.error(err);
  11. process.exit(1);
  12. });