2023-01-21 22:07:27 +01:00
|
|
|
import { DeConfEngine } from "./engine.js";
|
|
|
|
|
|
|
|
const deconf = new DeConfEngine();
|
|
|
|
await deconf.init();
|
|
|
|
|
|
|
|
let cmd = Deno.args[0] || "build";
|
|
|
|
let args = Deno.args.slice(1) || [];
|
|
|
|
|
2023-02-05 16:21:19 +01:00
|
|
|
const options = Object.fromEntries(
|
|
|
|
args.map((x) => {
|
|
|
|
const [key, value] = x.split("=");
|
|
|
|
if (!value) return null;
|
|
|
|
return [key, value];
|
|
|
|
}).filter((x) => x),
|
|
|
|
);
|
|
|
|
|
2023-01-21 22:07:27 +01:00
|
|
|
const output = await deconf[cmd](...args);
|
|
|
|
if (output) {
|
|
|
|
console.log(output);
|
|
|
|
}
|