UNPKG

hugo-extended

Version:

✏️ Plug-and-play binary wrapper for Hugo Extended, the awesomest static-site generator.

16 lines (12 loc) 369 B
#!/usr/bin/env node import { spawn } from "child_process"; import hugo from "../index.js"; (async () => { const args = process.argv.slice(2); const bin = await hugo(); spawn(bin, args, { stdio: "inherit" }) .on("exit", (code) => { // forward Hugo's exit code so this module itself reports success/failure process.exitCode = code; }); })();