Comments and the ipal-kit usage line only (adds ipal-doctor); no behaviour. Co-Authored-By: Claude Opus 5.5 <[email protected]>
24 lines
1.1 KiB
JavaScript
Executable File
24 lines
1.1 KiB
JavaScript
Executable File
#!/usr/bin/env node
|
|
// ipal-kit — the plugin's command line.
|
|
// pnpm dlx @intecion/ipal-kit@<version> create intecion.com → a new client site (docs/project-starter.md)
|
|
// pnpm exec ipal-kit create intecion.com --dir ../intecioncom-web --answers answers.json
|
|
// `pnpm dlx <package>` runs the bin named after the package, so every subcommand lives here.
|
|
// The other tools keep their own bins: ipal-skills, ipal-blocks, ipal-tokens, ipal-doctor.
|
|
|
|
import { dirname, join } from 'node:path'
|
|
import { fileURLToPath, pathToFileURL } from 'node:url'
|
|
|
|
const USAGE = `Usage: ipal-kit <command> [options]
|
|
create <domain> a new client site from the reference site (ipal-kit create --help)
|
|
|
|
Other tools: ipal-skills, ipal-blocks, ipal-tokens, ipal-doctor`
|
|
|
|
const [command, ...args] = process.argv.slice(2)
|
|
if (command !== 'create') {
|
|
console.log(USAGE)
|
|
process.exit(command === undefined || command === '--help' || command === '-h' ? 0 : 1)
|
|
}
|
|
const pkgRoot = join(dirname(fileURLToPath(import.meta.url)), '..')
|
|
const { runCreateCli } = await import(pathToFileURL(join(pkgRoot, 'dist', 'modules', 'starter', 'cli.js')).href)
|
|
process.exit(await runCreateCli(args))
|