@smicolon/fasla-ui 0.4.2 → 0.5.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smicolon/fasla-ui",
3
- "version": "0.4.2",
3
+ "version": "0.5.1",
4
4
  "description": "Professional UI components with animations and app building blocks",
5
5
  "license": "MIT",
6
6
  "author": "Smicolon",
@@ -58,7 +58,7 @@
58
58
  "registry.json"
59
59
  ],
60
60
  "bin": {
61
- "fasla-ui": "./bin/fasla-ui.mjs"
61
+ "fasla-ui": "dist/cli/index.js"
62
62
  },
63
63
  "scripts": {
64
64
  "build": "tsup",
@@ -77,13 +77,21 @@
77
77
  "devDependencies": {
78
78
  "@testing-library/jest-dom": "^6.4.0",
79
79
  "@testing-library/react": "^14.2.0",
80
+ "@types/fs-extra": "^11.0.0",
81
+ "@types/prompts": "^2.4.0",
80
82
  "@types/react": "^18.2.0",
81
83
  "@types/react-dom": "^18.2.0",
82
84
  "@vitejs/plugin-react": "^4.2.0",
85
+ "chalk": "^5.3.0",
86
+ "commander": "^12.0.0",
83
87
  "eslint": "^8.57.0",
84
88
  "framer-motion": "^11.0.0",
89
+ "fs-extra": "^11.2.0",
85
90
  "jsdom": "^24.0.0",
91
+ "jsonc-parser": "^3.3.1",
86
92
  "lucide-react": "^1.48.0",
93
+ "ora": "^8.0.0",
94
+ "prompts": "^2.4.0",
87
95
  "react": "^18.2.0",
88
96
  "react-dom": "^18.2.0",
89
97
  "tsup": "^8.0.0",
package/bin/fasla-ui.mjs DELETED
@@ -1,54 +0,0 @@
1
- #!/usr/bin/env node
2
- import fs from "node:fs";
3
- import path from "node:path";
4
-
5
- function usage() {
6
- console.log(`fasla-ui (scaffold)
7
- Usage:
8
- fasla-ui add <registry-path> --to <target-dir>
9
-
10
- Example:
11
- fasla-ui add blocks/app-shell --to ../client/src/components/blocks
12
- `);
13
- }
14
-
15
- function copyDir(src, dest) {
16
- fs.mkdirSync(dest, { recursive: true });
17
- for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
18
- const srcPath = path.join(src, entry.name);
19
- const destPath = path.join(dest, entry.name);
20
- if (entry.isDirectory()) copyDir(srcPath, destPath);
21
- else fs.copyFileSync(srcPath, destPath);
22
- }
23
- }
24
-
25
- const args = process.argv.slice(2);
26
- if (args.length === 0 || args.includes("-h") || args.includes("--help")) {
27
- usage();
28
- process.exit(0);
29
- }
30
-
31
- const cmd = args[0];
32
- if (cmd !== "add") {
33
- usage();
34
- process.exit(1);
35
- }
36
-
37
- const item = args[1];
38
- const toIdx = args.findIndex((a) => a === "--to");
39
- const targetDir = toIdx >= 0 ? args[toIdx + 1] : null;
40
- if (!item || !targetDir) {
41
- usage();
42
- process.exit(1);
43
- }
44
-
45
- const registryRoot = path.resolve(process.cwd(), "packages/fasla-ui/registry");
46
- const srcDir = path.join(registryRoot, item);
47
- if (!fs.existsSync(srcDir)) {
48
- console.error(`Registry path not found: ${srcDir}`);
49
- process.exit(1);
50
- }
51
-
52
- const destDir = path.resolve(process.cwd(), targetDir, path.basename(item));
53
- copyDir(srcDir, destDir);
54
- console.log(`Added ${item} -> ${destDir}`);