@dinachi/cli 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -431,7 +431,7 @@ var addCommand = new Command("add").description("Add a component to your project
431
431
  }
432
432
  const componentsToInstall = [componentName, ...getComponentDependencies(componentName)];
433
433
  spinner.text = `Installing ${componentsToInstall.join(", ")}...`;
434
- const componentDir = path2.join(process.cwd(), config.aliases.components);
434
+ const componentDir = path2.join(process.cwd(), config.aliases.ui.replace("@/", "src/"));
435
435
  await fs2.ensureDir(componentDir);
436
436
  let allFilesAdded = [];
437
437
  let allDepsInstalled = [];
@@ -445,7 +445,7 @@ var addCommand = new Command("add").description("Add a component to your project
445
445
  }
446
446
  const utilityRegistry = getUtilityRegistry();
447
447
  const uniqueUtilityDeps = [...new Set(allUtilityDeps)];
448
- const utilsDir = path2.join(process.cwd(), config.aliases.utils);
448
+ const utilsDir = path2.join(process.cwd(), config.aliases.lib.replace("@/", "src/"));
449
449
  if (uniqueUtilityDeps.length > 0) {
450
450
  await fs2.ensureDir(utilsDir);
451
451
  for (const utilityName of uniqueUtilityDeps) {
@@ -460,7 +460,7 @@ var addCommand = new Command("add").description("Add a component to your project
460
460
  await fs2.writeFile(targetPath, content);
461
461
  allFilesAdded.push({
462
462
  name: utilityFilename,
463
- path: path2.join(config.aliases.utils, utilityFilename)
463
+ path: path2.join(config.aliases.lib, utilityFilename)
464
464
  });
465
465
  if (utility.dependencies?.length) {
466
466
  allDepsInstalled.push(...utility.dependencies);
@@ -481,7 +481,7 @@ var addCommand = new Command("add").description("Add a component to your project
481
481
  let content = await fs2.readFile(sourcePath, "utf-8");
482
482
  content = content.replace(/^\/\/ @ts-nocheck\s*\n/m, "");
483
483
  await fs2.writeFile(targetPath, content);
484
- allFilesAdded.push({ name: file.name, path: path2.join(config.aliases.components, file.name) });
484
+ allFilesAdded.push({ name: file.name, path: path2.join(config.aliases.ui, file.name) });
485
485
  }
486
486
  if (comp.dependencies?.length) {
487
487
  allDepsInstalled.push(...comp.dependencies);
@@ -614,17 +614,21 @@ export function cn(...inputs: ClassValue[]) {
614
614
  "cssVariables": true
615
615
  },
616
616
  "aliases": {
617
- "components": "${response.componentsPath}",
618
- "utils": "${response.utilsPath}"
619
- }
617
+ "components": "@/components",
618
+ "utils": "@/lib/utils",
619
+ "ui": "@/components/ui",
620
+ "lib": "@/lib",
621
+ "hooks": "@/hooks"
622
+ },
623
+ "iconLibrary": "lucide"
620
624
  }`;
621
625
  await fs3.writeFile("components.json", configContent);
622
626
  spinner.succeed("\u2705 Dinachi UI setup complete!");
623
627
  console.log();
624
628
  console.log("Next steps:");
625
629
  console.log(` 1. Add a component: ${chalk2.cyan("npx @dinachi/cli add button")}`);
626
- console.log(` 2. Components will be installed to: ${chalk2.cyan(response.componentsPath)}`);
627
- console.log(` 3. Utils available at: ${chalk2.cyan(path3.join(response.utilsPath, "utils.ts"))}`);
630
+ console.log(` 2. Components will be installed to: ${chalk2.cyan("@/components/ui")}`);
631
+ console.log(` 3. Utils available at: ${chalk2.cyan("@/lib/utils")}`);
628
632
  console.log();
629
633
  console.log("\u{1F4A1} Tip: Install globally for shorter commands:");
630
634
  console.log(` ${chalk2.cyan("npm install -g @dinachi/cli")}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dinachi/cli",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "CLI for adding Dinachi UI components to your project",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -1,8 +1,9 @@
1
+ // @ts-nocheck
1
2
  "use client"
2
3
 
3
4
  import * as React from "react"
4
5
  import { Select as SelectPrimitive } from "@base-ui-components/react/select"
5
- import { cn } from "@dinachi/core"
6
+ import { cn } from "@/lib/utils"
6
7
  import { Check, ChevronDown } from "lucide-react"
7
8
 
8
9