UNPKG

init-lp

Version:

CLI pentru setup-ul unui proiect Astro cu React, Tailwind și ShadCN

24 lines (23 loc) 853 B
import chalk from "chalk"; import chalkAnimation from "chalk-animation"; import { exec } from "child_process"; export async function addSass(count, projectName) { console.log(`\n${chalk.cyan(`Step ${count}:`)} Add SASS\n`); const rainbowText = chalkAnimation.rainbow("Installing SASS Embedded...\n"); return new Promise((resolve, reject) => { exec(`cd ${projectName} && npm install -D sass-embedded`, (error, stdout, stderr) => { rainbowText.stop(); if (error) { console.error(chalk.red(`Error: ${error.message}`)); reject(error); return; } if (stderr) { console.error(chalk.yellow(`stderr: ${stderr}`)); return; } console.log(stdout); resolve(); }); }); }