@creative-tim/ui 0.1.0-beta.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/README.md +73 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +166 -0
- package/dist/index.js.map +1 -0
- package/package.json +71 -0
package/README.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# @creative-tim/ui
|
|
2
|
+
|
|
3
|
+
A CLI for adding [Creative Tim UI](https://creative-tim.com/ui) components and blocks to your project.
|
|
4
|
+
|
|
5
|
+
Built by [Creative Tim](https://creative-tim.com) - Based on shadcn/ui registry system.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx @creative-tim/ui@latest add button
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
### Initialize your project
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npx @creative-tim/ui@latest init
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
This creates a `components.json` file in your project with the necessary configuration.
|
|
22
|
+
|
|
23
|
+
### Add components
|
|
24
|
+
|
|
25
|
+
Add one or more components:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# Add a single component
|
|
29
|
+
npx @creative-tim/ui@latest add button
|
|
30
|
+
|
|
31
|
+
# Add multiple components
|
|
32
|
+
npx @creative-tim/ui@latest add button card dialog
|
|
33
|
+
|
|
34
|
+
# Add blocks
|
|
35
|
+
npx @creative-tim/ui@latest add software-purchase-01
|
|
36
|
+
npx @creative-tim/ui@latest add testimonials-01
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Options
|
|
40
|
+
|
|
41
|
+
- `-y, --yes` - Skip confirmation prompts
|
|
42
|
+
- `-o, --overwrite` - Overwrite existing files
|
|
43
|
+
- `--cwd <path>` - Specify working directory
|
|
44
|
+
- `-p, --path <path>` - Specify installation path
|
|
45
|
+
|
|
46
|
+
## Component Types
|
|
47
|
+
|
|
48
|
+
### UI Components
|
|
49
|
+
|
|
50
|
+
Basic building blocks:
|
|
51
|
+
```bash
|
|
52
|
+
npx @creative-tim/ui@latest add button
|
|
53
|
+
npx @creative-tim/ui@latest add card
|
|
54
|
+
npx @creative-tim/ui@latest add dialog
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Blocks
|
|
58
|
+
|
|
59
|
+
Pre-built sections:
|
|
60
|
+
```bash
|
|
61
|
+
npx @creative-tim/ui@latest add software-purchase-01
|
|
62
|
+
npx @creative-tim/ui@latest add testimonials-01
|
|
63
|
+
npx @creative-tim/ui@latest add web3-02
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Documentation
|
|
67
|
+
|
|
68
|
+
Visit [creative-tim.com/ui](https://creative-tim.com/ui/docs) for complete documentation.
|
|
69
|
+
|
|
70
|
+
## License
|
|
71
|
+
|
|
72
|
+
MIT Ā© [Creative Tim](https://creative-tim.com)
|
|
73
|
+
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// src/index.ts
|
|
4
|
+
import { Command as Command3 } from "commander";
|
|
5
|
+
import pc3 from "picocolors";
|
|
6
|
+
|
|
7
|
+
// src/commands/add.ts
|
|
8
|
+
import { Command } from "commander";
|
|
9
|
+
import pc from "picocolors";
|
|
10
|
+
import ora from "ora";
|
|
11
|
+
import path from "path";
|
|
12
|
+
import fs from "fs-extra";
|
|
13
|
+
import fetch from "node-fetch";
|
|
14
|
+
var REGISTRY_URL = "https://creative-tim.com/ui/r";
|
|
15
|
+
var addCommand = new Command().name("add").description("Add a component or block to your project").argument("[components...]", "The components to add").option("-y, --yes", "Skip confirmation prompt").option("-o, --overwrite", "Overwrite existing files").option("--cwd <path>", "The working directory. Defaults to the current directory.", process.cwd()).option("-p, --path <path>", "The path to add the component to").action(async (components, opts) => {
|
|
16
|
+
if (!components || components.length === 0) {
|
|
17
|
+
console.error(pc.red("Error: Please specify at least one component to add."));
|
|
18
|
+
console.log(pc.dim("\nExample:"));
|
|
19
|
+
console.log(pc.dim(" npx @creative-tim/ui add button"));
|
|
20
|
+
console.log(pc.dim(" npx @creative-tim/ui add card button"));
|
|
21
|
+
console.log(pc.dim(" npx @creative-tim/ui add software-purchase-01"));
|
|
22
|
+
process.exit(1);
|
|
23
|
+
}
|
|
24
|
+
const cwd = path.resolve(opts.cwd || process.cwd());
|
|
25
|
+
console.log(pc.cyan("\n\u{1F4E6} Adding components to your project...\n"));
|
|
26
|
+
for (const component of components) {
|
|
27
|
+
await addComponent(component, cwd, opts);
|
|
28
|
+
}
|
|
29
|
+
console.log(pc.green("\n\u2713 Components added successfully!\n"));
|
|
30
|
+
});
|
|
31
|
+
async function addComponent(name, cwd, opts) {
|
|
32
|
+
const spinner = ora(`Fetching ${pc.cyan(name)}...`).start();
|
|
33
|
+
try {
|
|
34
|
+
const url = `${REGISTRY_URL}/${name}.json`;
|
|
35
|
+
const response = await fetch(url);
|
|
36
|
+
if (!response.ok) {
|
|
37
|
+
spinner.fail(`Component ${pc.cyan(name)} not found`);
|
|
38
|
+
console.log(pc.dim(` Tried: ${url}`));
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const data = await response.json();
|
|
42
|
+
spinner.text = `Installing ${pc.cyan(name)}...`;
|
|
43
|
+
for (const file of data.files) {
|
|
44
|
+
const filePath = path.join(cwd, file.path);
|
|
45
|
+
const fileDir = path.dirname(filePath);
|
|
46
|
+
if (fs.existsSync(filePath) && !opts.overwrite && !opts.yes) {
|
|
47
|
+
spinner.warn(`File ${pc.dim(file.path)} already exists. Use --overwrite to replace.`);
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
await fs.ensureDir(fileDir);
|
|
51
|
+
await fs.writeFile(filePath, file.content, "utf-8");
|
|
52
|
+
}
|
|
53
|
+
if (data.dependencies && data.dependencies.length > 0) {
|
|
54
|
+
spinner.text = `Installing dependencies for ${pc.cyan(name)}...`;
|
|
55
|
+
const deps = data.dependencies.join(" ");
|
|
56
|
+
const { execSync } = await import("child_process");
|
|
57
|
+
try {
|
|
58
|
+
execSync(`npm install ${deps}`, { cwd, stdio: "ignore" });
|
|
59
|
+
} catch (error) {
|
|
60
|
+
spinner.warn(`Failed to install dependencies: ${deps}`);
|
|
61
|
+
console.log(pc.dim(` Run manually: npm install ${deps}`));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
if (data.registryDependencies && data.registryDependencies.length > 0) {
|
|
65
|
+
spinner.text = `Installing registry dependencies for ${pc.cyan(name)}...`;
|
|
66
|
+
for (const dep of data.registryDependencies) {
|
|
67
|
+
await addComponent(dep, cwd, { ...opts, yes: true });
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
spinner.succeed(`Added ${pc.cyan(name)}`);
|
|
71
|
+
} catch (error) {
|
|
72
|
+
spinner.fail(`Failed to add ${pc.cyan(name)}`);
|
|
73
|
+
console.error(pc.red(` ${error.message}`));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// src/commands/init.ts
|
|
78
|
+
import { Command as Command2 } from "commander";
|
|
79
|
+
import pc2 from "picocolors";
|
|
80
|
+
import prompts from "prompts";
|
|
81
|
+
import { existsSync } from "fs";
|
|
82
|
+
import fs2 from "fs-extra";
|
|
83
|
+
import path2 from "path";
|
|
84
|
+
import ora2 from "ora";
|
|
85
|
+
var initCommand = new Command2().name("init").description("Initialize your project with Creative Tim UI configuration").option("-y, --yes", "Skip prompts and use default values").option("--cwd <path>", "The working directory. Defaults to the current directory.", process.cwd()).action(async (opts) => {
|
|
86
|
+
const cwd = path2.resolve(opts.cwd || process.cwd());
|
|
87
|
+
console.log(pc2.cyan("\n\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"));
|
|
88
|
+
console.log(pc2.cyan("\u2502 Welcome to Creative Tim UI \u2502"));
|
|
89
|
+
console.log(pc2.cyan("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n"));
|
|
90
|
+
const componentsJsonPath = path2.resolve(cwd, "components.json");
|
|
91
|
+
if (existsSync(componentsJsonPath) && !opts.yes) {
|
|
92
|
+
const { overwrite } = await prompts({
|
|
93
|
+
type: "confirm",
|
|
94
|
+
name: "overwrite",
|
|
95
|
+
message: "components.json already exists. Overwrite?",
|
|
96
|
+
initial: false
|
|
97
|
+
});
|
|
98
|
+
if (!overwrite) {
|
|
99
|
+
console.log(pc2.yellow("Initialization cancelled."));
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
const spinner = ora2("Initializing project...").start();
|
|
104
|
+
try {
|
|
105
|
+
const config = {
|
|
106
|
+
"$schema": "https://ui.shadcn.com/schema.json",
|
|
107
|
+
"style": "default",
|
|
108
|
+
"rsc": true,
|
|
109
|
+
"tsx": true,
|
|
110
|
+
"tailwind": {
|
|
111
|
+
"config": "tailwind.config.ts",
|
|
112
|
+
"css": "app/globals.css",
|
|
113
|
+
"baseColor": "slate",
|
|
114
|
+
"cssVariables": true,
|
|
115
|
+
"prefix": ""
|
|
116
|
+
},
|
|
117
|
+
"aliases": {
|
|
118
|
+
"components": "@/components",
|
|
119
|
+
"utils": "@/lib/utils",
|
|
120
|
+
"ui": "@/components/ui",
|
|
121
|
+
"lib": "@/lib",
|
|
122
|
+
"hooks": "@/hooks"
|
|
123
|
+
},
|
|
124
|
+
"registry": "https://creative-tim.com/ui"
|
|
125
|
+
};
|
|
126
|
+
await fs2.writeJSON(componentsJsonPath, config, { spaces: 2 });
|
|
127
|
+
spinner.succeed("Project initialized successfully!");
|
|
128
|
+
console.log(pc2.green("\n\u2713 Created components.json"));
|
|
129
|
+
console.log(pc2.dim("\nNext steps:"));
|
|
130
|
+
console.log(pc2.dim(" 1. Review your components.json"));
|
|
131
|
+
console.log(pc2.dim(" 2. Run: npx @creative-tim/ui add button"));
|
|
132
|
+
console.log(pc2.dim(" 3. Start using Creative Tim UI components!\n"));
|
|
133
|
+
} catch (error) {
|
|
134
|
+
spinner.fail("Failed to initialize project");
|
|
135
|
+
throw error;
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
// src/index.ts
|
|
140
|
+
import { readFileSync } from "fs";
|
|
141
|
+
import { fileURLToPath } from "url";
|
|
142
|
+
import { dirname, join } from "path";
|
|
143
|
+
var __filename = fileURLToPath(import.meta.url);
|
|
144
|
+
var __dirname = dirname(__filename);
|
|
145
|
+
var packageVersion = "0.1.0";
|
|
146
|
+
try {
|
|
147
|
+
const packageJsonPath = join(__dirname, "../package.json");
|
|
148
|
+
const packageJsonContent = readFileSync(packageJsonPath, "utf-8");
|
|
149
|
+
const packageJson = JSON.parse(packageJsonContent);
|
|
150
|
+
packageVersion = packageJson.version;
|
|
151
|
+
} catch (error) {
|
|
152
|
+
}
|
|
153
|
+
async function main() {
|
|
154
|
+
const program = new Command3().name("creative-tim-ui").description("A CLI for adding Creative Tim UI components to your project").version(
|
|
155
|
+
packageVersion,
|
|
156
|
+
"-v, --version",
|
|
157
|
+
"display the version number"
|
|
158
|
+
);
|
|
159
|
+
program.addCommand(initCommand).addCommand(addCommand);
|
|
160
|
+
program.parse();
|
|
161
|
+
}
|
|
162
|
+
main().catch((error) => {
|
|
163
|
+
console.error(pc3.red("Error:"), error.message);
|
|
164
|
+
process.exit(1);
|
|
165
|
+
});
|
|
166
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/commands/add.ts","../src/commands/init.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { Command } from \"commander\"\nimport pc from \"picocolors\"\nimport { addCommand } from \"./commands/add.js\"\nimport { initCommand } from \"./commands/init.js\"\nimport { readFileSync } from \"fs\"\nimport { fileURLToPath } from \"url\"\nimport { dirname, join } from \"path\"\n\nconst __filename = fileURLToPath(import.meta.url)\nconst __dirname = dirname(__filename)\n\n// Read version from package.json\nlet packageVersion = \"0.1.0\"\ntry {\n const packageJsonPath = join(__dirname, \"../package.json\")\n const packageJsonContent = readFileSync(packageJsonPath, \"utf-8\")\n const packageJson = JSON.parse(packageJsonContent)\n packageVersion = packageJson.version\n} catch (error) {\n // Fallback to default version\n}\n\nasync function main() {\n const program = new Command()\n .name(\"creative-tim-ui\")\n .description(\"A CLI for adding Creative Tim UI components to your project\")\n .version(\n packageVersion,\n \"-v, --version\",\n \"display the version number\"\n )\n\n program\n .addCommand(initCommand)\n .addCommand(addCommand)\n\n program.parse()\n}\n\nmain().catch((error) => {\n console.error(pc.red(\"Error:\"), error.message)\n process.exit(1)\n})\n\n","import { Command } from \"commander\"\nimport pc from \"picocolors\"\nimport ora from \"ora\"\nimport path from \"path\"\nimport fs from \"fs-extra\"\nimport fetch from \"node-fetch\"\n\nconst REGISTRY_URL = \"https://creative-tim.com/ui/r\"\n\ninterface RegistryItem {\n name: string\n type: string\n files: Array<{\n path: string\n content: string\n type: string\n target?: string\n }>\n dependencies?: string[]\n registryDependencies?: string[]\n}\n\nexport const addCommand = new Command()\n .name(\"add\")\n .description(\"Add a component or block to your project\")\n .argument(\"[components...]\", \"The components to add\")\n .option(\"-y, --yes\", \"Skip confirmation prompt\")\n .option(\"-o, --overwrite\", \"Overwrite existing files\")\n .option(\"--cwd <path>\", \"The working directory. Defaults to the current directory.\", process.cwd())\n .option(\"-p, --path <path>\", \"The path to add the component to\")\n .action(async (components: string[], opts) => {\n if (!components || components.length === 0) {\n console.error(pc.red(\"Error: Please specify at least one component to add.\"))\n console.log(pc.dim(\"\\nExample:\"))\n console.log(pc.dim(\" npx @creative-tim/ui add button\"))\n console.log(pc.dim(\" npx @creative-tim/ui add card button\"))\n console.log(pc.dim(\" npx @creative-tim/ui add software-purchase-01\"))\n process.exit(1)\n }\n\n const cwd = path.resolve(opts.cwd || process.cwd())\n\n console.log(pc.cyan(\"\\nš¦ Adding components to your project...\\n\"))\n\n for (const component of components) {\n await addComponent(component, cwd, opts)\n }\n\n console.log(pc.green(\"\\nā Components added successfully!\\n\"))\n })\n\nasync function addComponent(name: string, cwd: string, opts: any) {\n const spinner = ora(`Fetching ${pc.cyan(name)}...`).start()\n\n try {\n // Fetch component from registry\n const url = `${REGISTRY_URL}/${name}.json`\n const response = await fetch(url)\n\n if (!response.ok) {\n spinner.fail(`Component ${pc.cyan(name)} not found`)\n console.log(pc.dim(` Tried: ${url}`))\n return\n }\n\n const data = await response.json() as RegistryItem\n\n spinner.text = `Installing ${pc.cyan(name)}...`\n\n // Install files\n for (const file of data.files) {\n const filePath = path.join(cwd, file.path)\n const fileDir = path.dirname(filePath)\n\n // Check if file exists\n if (fs.existsSync(filePath) && !opts.overwrite && !opts.yes) {\n spinner.warn(`File ${pc.dim(file.path)} already exists. Use --overwrite to replace.`)\n continue\n }\n\n // Create directory if it doesn't exist\n await fs.ensureDir(fileDir)\n\n // Write file\n await fs.writeFile(filePath, file.content, \"utf-8\")\n }\n\n // Install npm dependencies\n if (data.dependencies && data.dependencies.length > 0) {\n spinner.text = `Installing dependencies for ${pc.cyan(name)}...`\n \n const deps = data.dependencies.join(\" \")\n const { execSync } = await import(\"child_process\")\n \n try {\n execSync(`npm install ${deps}`, { cwd, stdio: \"ignore\" })\n } catch (error) {\n spinner.warn(`Failed to install dependencies: ${deps}`)\n console.log(pc.dim(` Run manually: npm install ${deps}`))\n }\n }\n\n // Handle registry dependencies (other components)\n if (data.registryDependencies && data.registryDependencies.length > 0) {\n spinner.text = `Installing registry dependencies for ${pc.cyan(name)}...`\n \n for (const dep of data.registryDependencies) {\n await addComponent(dep, cwd, { ...opts, yes: true })\n }\n }\n\n spinner.succeed(`Added ${pc.cyan(name)}`)\n\n } catch (error: any) {\n spinner.fail(`Failed to add ${pc.cyan(name)}`)\n console.error(pc.red(` ${error.message}`))\n }\n}\n\n","import { Command } from \"commander\"\nimport pc from \"picocolors\"\nimport prompts from \"prompts\"\nimport { existsSync } from \"fs\"\nimport fs from \"fs-extra\"\nimport path from \"path\"\nimport ora from \"ora\"\n\nexport const initCommand = new Command()\n .name(\"init\")\n .description(\"Initialize your project with Creative Tim UI configuration\")\n .option(\"-y, --yes\", \"Skip prompts and use default values\")\n .option(\"--cwd <path>\", \"The working directory. Defaults to the current directory.\", process.cwd())\n .action(async (opts) => {\n const cwd = path.resolve(opts.cwd || process.cwd())\n \n console.log(pc.cyan(\"\\nāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā\"))\n console.log(pc.cyan(\"ā Welcome to Creative Tim UI ā\"))\n console.log(pc.cyan(\"āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā\\n\"))\n\n // Check if components.json exists\n const componentsJsonPath = path.resolve(cwd, \"components.json\")\n \n if (existsSync(componentsJsonPath) && !opts.yes) {\n const { overwrite } = await prompts({\n type: \"confirm\",\n name: \"overwrite\",\n message: \"components.json already exists. Overwrite?\",\n initial: false\n })\n\n if (!overwrite) {\n console.log(pc.yellow(\"Initialization cancelled.\"))\n return\n }\n }\n\n const spinner = ora(\"Initializing project...\").start()\n\n try {\n // Create components.json\n const config = {\n \"$schema\": \"https://ui.shadcn.com/schema.json\",\n \"style\": \"default\",\n \"rsc\": true,\n \"tsx\": true,\n \"tailwind\": {\n \"config\": \"tailwind.config.ts\",\n \"css\": \"app/globals.css\",\n \"baseColor\": \"slate\",\n \"cssVariables\": true,\n \"prefix\": \"\"\n },\n \"aliases\": {\n \"components\": \"@/components\",\n \"utils\": \"@/lib/utils\",\n \"ui\": \"@/components/ui\",\n \"lib\": \"@/lib\",\n \"hooks\": \"@/hooks\"\n },\n \"registry\": \"https://creative-tim.com/ui\"\n }\n\n await fs.writeJSON(componentsJsonPath, config, { spaces: 2 })\n\n spinner.succeed(\"Project initialized successfully!\")\n \n console.log(pc.green(\"\\nā Created components.json\"))\n console.log(pc.dim(\"\\nNext steps:\"))\n console.log(pc.dim(\" 1. Review your components.json\"))\n console.log(pc.dim(\" 2. Run: npx @creative-tim/ui add button\"))\n console.log(pc.dim(\" 3. Start using Creative Tim UI components!\\n\"))\n\n } catch (error) {\n spinner.fail(\"Failed to initialize project\")\n throw error\n }\n })\n\n"],"mappings":";;;AACA,SAAS,WAAAA,gBAAe;AACxB,OAAOC,SAAQ;;;ACFf,SAAS,eAAe;AACxB,OAAO,QAAQ;AACf,OAAO,SAAS;AAChB,OAAO,UAAU;AACjB,OAAO,QAAQ;AACf,OAAO,WAAW;AAElB,IAAM,eAAe;AAed,IAAM,aAAa,IAAI,QAAQ,EACnC,KAAK,KAAK,EACV,YAAY,0CAA0C,EACtD,SAAS,mBAAmB,uBAAuB,EACnD,OAAO,aAAa,0BAA0B,EAC9C,OAAO,mBAAmB,0BAA0B,EACpD,OAAO,gBAAgB,6DAA6D,QAAQ,IAAI,CAAC,EACjG,OAAO,qBAAqB,kCAAkC,EAC9D,OAAO,OAAO,YAAsB,SAAS;AAC5C,MAAI,CAAC,cAAc,WAAW,WAAW,GAAG;AAC1C,YAAQ,MAAM,GAAG,IAAI,sDAAsD,CAAC;AAC5E,YAAQ,IAAI,GAAG,IAAI,YAAY,CAAC;AAChC,YAAQ,IAAI,GAAG,IAAI,mCAAmC,CAAC;AACvD,YAAQ,IAAI,GAAG,IAAI,wCAAwC,CAAC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C7B,SAAS,qBAAqB;AAC9B,SAAS,SAAS,YAAY;AAE9B,IAAM,aAAa,cAAc,YAAY,GAAG;AAChD,IAAM,YAAY,QAAQ,UAAU;AAGpC,IAAI,iBAAiB;AACrB,IAAI;AACF,QAAM,kBAAkB,KAAK,WAAW,iBAAiB;AACzD,QAAM,qBAAqB,aAAa,iBAAiB,OAAO;AAChE,QAAM,cAAc,KAAK,MAAM,kBAAkB;AACjD,mBAAiB,YAAY;AAC/B,SAAS,OAAO;AAEhB;AAEA,eAAe,OAAO;AACpB,QAAM,UAAU,IAAII,SAAQ,EACzB,KAAK,iBAAiB,EACtB,YAAY,6DAA6D,EACzE;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEF,UACG,WAAW,WAAW,EACtB,WAAW,UAAU;AAExB,UAAQ,MAAM;AAChB;AAEA,KAAK,EAAE,MAAM,CAAC,UAAU;AACtB,UAAQ,MAAMC,IAAG,IAAI,QAAQ,GAAG,MAAM,OAAO;AAC7C,UAAQ,KAAK,CAAC;AAChB,CAAC;","names":["Command","pc","Command","pc","fs","path","ora","Command","pc"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@creative-tim/ui",
|
|
3
|
+
"version": "0.1.0-beta.0",
|
|
4
|
+
"description": "A CLI for adding Creative Tim UI components, blocks and AI agents to your project",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Creative Tim",
|
|
7
|
+
"email": "hello@creative-tim.com",
|
|
8
|
+
"url": "https://creative-tim.com"
|
|
9
|
+
},
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"type": "module",
|
|
12
|
+
"exports": "./dist/index.js",
|
|
13
|
+
"bin": {
|
|
14
|
+
"creative-tim-ui": "./dist/index.js",
|
|
15
|
+
"creative-tim": "./dist/index.js"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"README.md"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"dev": "tsup --watch",
|
|
23
|
+
"build": "tsup",
|
|
24
|
+
"typecheck": "tsc --noEmit",
|
|
25
|
+
"clean": "rimraf dist",
|
|
26
|
+
"prepublishOnly": "npm run build"
|
|
27
|
+
},
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "https://github.com/creativetimofficial/ui.git",
|
|
31
|
+
"directory": "packages/cli"
|
|
32
|
+
},
|
|
33
|
+
"homepage": "https://creative-tim.com/ui",
|
|
34
|
+
"bugs": {
|
|
35
|
+
"url": "https://github.com/creativetimofficial/ui/issues"
|
|
36
|
+
},
|
|
37
|
+
"keywords": [
|
|
38
|
+
"creative-tim",
|
|
39
|
+
"ui",
|
|
40
|
+
"components",
|
|
41
|
+
"cli",
|
|
42
|
+
"react",
|
|
43
|
+
"nextjs",
|
|
44
|
+
"tailwindcss",
|
|
45
|
+
"shadcn",
|
|
46
|
+
"blocks"
|
|
47
|
+
],
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"access": "public"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"commander": "^11.1.0",
|
|
53
|
+
"picocolors": "^1.0.0",
|
|
54
|
+
"prompts": "^2.4.2",
|
|
55
|
+
"ora": "^8.0.1",
|
|
56
|
+
"node-fetch": "^3.3.2",
|
|
57
|
+
"fs-extra": "^11.2.0",
|
|
58
|
+
"cosmiconfig": "^9.0.0",
|
|
59
|
+
"ts-morph": "^21.0.1",
|
|
60
|
+
"zod": "^3.22.4"
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"@types/fs-extra": "^11.0.4",
|
|
64
|
+
"@types/node": "^20.11.27",
|
|
65
|
+
"@types/prompts": "^2.4.9",
|
|
66
|
+
"rimraf": "^5.0.5",
|
|
67
|
+
"tsup": "^8.0.1",
|
|
68
|
+
"typescript": "^5.3.3"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|