@sp-packages/copyrc
Version:
A lightweight CLI tool to automate copying template files during project setup or runtime.
3 lines (2 loc) • 719 B
JavaScript
;import{program as r}from"commander";import{createRequire as t}from"module";import{copyrc as n}from"../core/copyrc.js";import{Printer as o}from"./../utils/logger.js";import{readConfig as a}from"./../core/config.js";const c=t(import.meta.url),{version:p}=c("../../package.json");r.version(p).description("A lightweight CLI tool to automate copying template files during project setup or runtime.").option("-c, --config <path>","Specify config file (default: copyrc.json)").option("-q, --quiet","Disable output").option("-v, --verbose","Enable verbose logging").action(async e=>{e.verbose&&o.enableVerbose(),e.quiet&&o.enableQuiet();const i=await a(e.config);n(i)});r.parse(process.argv);