🎩 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.6
to
0.0.7
+11
-12
dist/commands/add.js

@@ -5,17 +5,16 @@ import chalk from "chalk";

import { fileURLToPath } from "url";
import { toPascalCase } from "../utils/fs.js";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
/**
* Copy the AnimatedTabs component from:
* src/components/ui/AnimatedTabs/animated-tabs.tsx
*/
function toPascalCase(str) {
return str.replace(/(^\w|-\w)/g, (m) => m.replace("-", "").toUpperCase());
}
export async function addComponent(name) {
const pascalName = toPascalCase(name); // animatedtabs → AnimatedTabs
const sourceFile = path.resolve(__dirname, "../../src/components/ui", pascalName, `${name}.tsx`);
const targetDir = path.resolve(process.cwd(), "components/ui", pascalName);
const targetFile = path.join(targetDir, `${name}.tsx`);
const folderName = toPascalCase(name); // e.g. Animatedtabs
const fileName = `${folderName}.tsx`; // e.g. Animatedtabs.tsx
const sourceFile = path.resolve(__dirname, "../../src/components/ui", folderName, fileName);
const targetDir = path.resolve(process.cwd(), "components/ui", folderName);
const targetFile = path.join(targetDir, fileName);
const exists = await fs.pathExists(sourceFile);
if (!exists) {
console.log(chalk.red(`❌ Component "${pascalName}" not found at ${sourceFile}`));
console.log(chalk.red(`❌ Component not found.\nExpected at: ${sourceFile}\nMake sure the component folder and file follow PascalCase.`));
return;

@@ -25,4 +24,4 @@ }

await fs.copyFile(sourceFile, targetFile);
console.log(chalk.green(`✅ Copied ${name}.tsx to components/ui/${pascalName}/`));
console.log(chalk.yellow(`👉 Make sure Tailwind plugins or animation utilities are set up if needed.`));
console.log(chalk.green(`✅ ${fileName} copied to components/ui/${folderName}/`));
console.log(chalk.yellow(`👉 Import using: import { AnimatedTabs } from "@/components/ui/Animatedtabs/Animatedtabs";`));
}
{
"name": "zedblock",
"version": "0.0.6",
"version": "0.0.7",
"type": "module",

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