terser.mjs 386 B

123456789101112131415161718192021
  1. #!/usr/bin/env node
  2. "use strict";
  3. import "../tools/exit.cjs";
  4. import fs from "fs"
  5. import path from "path"
  6. import program from "commander"
  7. import { run_cli } from "../lib/cli.js"
  8. const packageJson = {
  9. name: "terser",
  10. version: "experimental module CLI"
  11. }
  12. run_cli({ program, packageJson, fs, path }).catch((error) => {
  13. console.error(error);
  14. process.exitCode = 1;
  15. });