UNPKG

dejarun

Version:

A file system operation cache for Node.js, using a hash of the file or folder contents as the cache key.

32 lines 1.06 kB
#!/usr/bin/env node import { execa } from "execa"; import { parseArgs } from "node:util"; import logger from "../logger.js"; import dejarun from "../main.js"; const { values: { input: inputs, output: outputs, dependency: dependencies, clean, debug, logo, "no-logo": noLogo, }, positionals, } = parseArgs({ options: { input: { type: "string", multiple: true }, output: { type: "string", multiple: true }, dependency: { type: "string", multiple: true }, clean: { type: "boolean" }, debug: { type: "boolean" }, logo: { type: "string" }, "no-logo": { type: "boolean" }, }, allowPositionals: true, }); const command = positionals.join(" "); const logoOption = noLogo ? false : logo; if (!command) { logger("error", "No command provided to execute.", logoOption); process.exit(1); } await dejarun(command, () => execa(command, { shell: true, stdio: "inherit" }), { inputs, outputs, dependencies, clean, debug, logo: logoOption, }); //# sourceMappingURL=main.js.map