🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

zedblock

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zedblock - npm Package Compare versions

Package was removed
Sorry, it seems this package was removed from the registry
Comparing version
0.0.11
to
0.0.12
+10
-7
dist/commands/add.js

@@ -7,9 +7,12 @@ import chalk from "chalk";

const __dirname = path.dirname(__filename);
// PascalCase: animatedtabs → Animatedtabs
const pascalCase = (str) => str.replace(/(^\w|-\w)/g, (match) => match.replace("-", "").toUpperCase());
export async function addComponent(name) {
const componentName = pascalCase(name); // animated-tabs -> AnimatedTabs
const source = path.resolve(__dirname, "../../src/components", componentName);
const target = path.resolve(process.cwd(), "components/ui", componentName);
if (!(await fs.pathExists(source))) {
console.log(chalk.red(`❌ Component "${componentName}" not found.`));
const folderName = pascalCase(name); // Folder: Animatedtabs
const fileName = `${name}.tsx`; // File: animatedtabs.tsx
const source = path.resolve(__dirname, "../../src/components/ui", folderName, fileName);
const target = path.resolve(process.cwd(), "components/ui", folderName, fileName);
const exists = await fs.pathExists(source);
if (!exists) {
console.log(chalk.red(`❌ Component "${name}" not found.\nExpected at: ${source}`));
return;

@@ -19,4 +22,4 @@ }

await fs.copy(source, target);
console.log(chalk.green(`✅ Copied ${componentName} to components/ui/${componentName}`));
console.log(chalk.yellow(`👉 Make sure Tailwind is configured if this component uses classes or animations.`));
console.log(chalk.green(`✅ Copied ${fileName} to components/ui/${folderName}/`));
console.log(chalk.yellow(`👉 Usage: import { AnimatedTabs } from "@/components/ui/${folderName}/${fileName.replace(".tsx", "")}"`));
}
{
"name": "zedblock",
"version": "0.0.11",
"version": "0.0.12",
"type": "module",

@@ -5,0 +5,0 @@ "bin": {