UNPKG

automate-electron-ipc

Version:

Node library for automating the generation of IPC components for Electron apps.

15 lines (14 loc) 487 B
#!/usr/bin/env node import fs from "node:fs"; import { program } from "commander"; import { ipcAutomation } from "./automation.js"; import utils from "./utils.js"; program .name("ipcgen") .description("CLI tool for generating IPC components for Electron apps.") .version((() => { const filePath = utils.searchUpwards("package.json"); return JSON.parse(fs.readFileSync(filePath).toString()).version; })(), "-v, --version") .action(ipcAutomation); program.parse();