UNPKG

@funish/basis

Version:

A unified development toolkit with CLI for package management, versioning, publishing, linting, and git hooks management for JavaScript/TypeScript projects.

2 lines (1 loc) 819 B
import{defineCommand as i}from"citty";import{consola as n}from"consola";import{installDependencies as s}from"nypm";const t=i({meta:{name:"install",description:"Install project dependencies"},args:{cwd:{type:"string",description:"Working directory",default:process.cwd()},silent:{type:"boolean",description:"Silent mode",alias:"s"},"package-manager":{type:"string",description:"Package manager to use (npm, yarn, pnpm, bun, deno)",alias:"pm"},"frozen-lockfile":{type:"boolean",description:"Install with frozen lockfile",alias:"f"}},async run({args:e}){try{await s({cwd:e.cwd,silent:e.silent,packageManager:e["package-manager"],frozenLockFile:e["frozen-lockfile"]}),e.silent||n.success("Dependencies installed successfully")}catch(a){n.error("Failed to install dependencies:",a),process.exit(1)}}});export{t as default};