UNPKG

@jstb/catalyst

Version:

React Functional Component Generator in Atomic and Lego architecture in JavaScript and TypeScript

21 lines (17 loc) 497 B
#!/usr/bin/env node import path, { dirname } from "node:path"; import minimist from "minimist"; import { Plop, run } from "plop"; import { fileURLToPath } from "node:url"; const args = process.argv.slice(2); const argv = minimist(args); const __dirname = dirname(fileURLToPath(import.meta.url)); Plop.prepare( { cwd: argv.cwd, configPath: path.join(__dirname, "plopfile.js"), preload: argv.preload || [], completion: argv.completion, }, (env) => Plop.execute(env, run) );