yargs.mjs 473 B

12345678910
  1. // TODO: consolidate on using a helpers file at some point in the future, which
  2. // is the approach currently used to export Parser and applyExtends for ESM:
  3. import pkg from './build/index.cjs';
  4. const {applyExtends, cjsPlatformShim, Parser, processArgv, Yargs} = pkg;
  5. Yargs.applyExtends = (config, cwd, mergeExtends) => {
  6. return applyExtends(config, cwd, mergeExtends, cjsPlatformShim);
  7. };
  8. Yargs.hideBin = processArgv.hideBin;
  9. Yargs.Parser = Parser;
  10. export default Yargs;