Function
npxShadcn
(
cwd: string,
args: string[],
{
debug = false,
input,
timeout,
}: {
debug?: boolean
input?: string
timeout?: number
} = {}
)
Source from the content-addressed store, hash-verified
| 67 | } |
| 68 | |
| 69 | export async function npxShadcn( |
| 70 | cwd: string, |
| 71 | args: string[], |
| 72 | { |
| 73 | debug = false, |
| 74 | input, |
| 75 | timeout, |
| 76 | }: { |
| 77 | debug?: boolean |
| 78 | input?: string |
| 79 | timeout?: number |
| 80 | } = {} |
| 81 | ) { |
| 82 | const result = await runCommand(cwd, args, { |
| 83 | env: { |
| 84 | REGISTRY_URL: getRegistryUrl(), |
| 85 | SHADCN_TEMPLATE_DIR: TEMPLATES_DIR, |
| 86 | }, |
| 87 | input, |
| 88 | timeout, |
| 89 | }) |
| 90 | |
| 91 | if (debug) { |
| 92 | console.log(result) |
| 93 | } |
| 94 | |
| 95 | return result |
| 96 | } |
| 97 | |
| 98 | export function cssHasProperties( |
| 99 | cssContent: string, |