UNPKG

@softwareventures/maintain-project

Version:

Automatically create and maintain TypeScript projects with standard settings for Software Ventures Limited

30 lines 1.16 kB
import { argv, cwd } from "process"; import { last } from "@softwareventures/array"; import { Command } from "commander"; import pkg from "../package.json" with { type: "json" }; import { cliInit } from "./init.js"; import { cliUpdate } from "./update.js"; export default function cli() { const program = new Command() .allowExcessArguments(false) .name(last(pkg.name.split("/")) ?? "") .version(pkg.version); program .command("init [destination]") .option("--scope <scope>") .option("--name <name>") .option("--github-owner <owner>") .option("--github-project <name>") .option("--author-name <name>") .option("--author-email <email>") .option("--license <spdx-expression>") .option("--copyright-holder <name>") .option("--webapp") .action((destination, options) => void cliInit(String(destination ?? cwd()), options)); program .command("update [path]") .option("--breaking") .action((path, options) => void cliUpdate(String(path ?? cwd()), options)); program.parse(argv); } //# sourceMappingURL=index.js.map