zenith-gen
Version:
A CLI tool designed to streamline the creation of projects within the Zenith Inova ecosystem, providing optimized configurations and modern development tools.
24 lines (23 loc) • 708 B
JavaScript
import inquirer from 'inquirer';
import chalk from 'chalk';
import { execSync } from 'child_process';
export async function shadcnPrompt() {
const useShadcn = await inquirer
.prompt([
{
type: 'confirm',
name: 'useShadcn',
message: 'Would you like to use ShadCN?',
default: true,
},
])
.then(ans => ans.useShadcn);
return useShadcn;
}
export function installShadCN(packageManager) {
console.log(chalk.blue('Initializing ShadCN...'));
let shadcnInstall = packageManager === 'pnpm'
? 'pnpm dlx shadcn@latest init'
: 'npx shadcn@latest init';
execSync(shadcnInstall, { stdio: 'inherit' });
}