create-bunspace 0.4.0 → 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/dist/bin.js +100 -0
- package/dist/templates/fumadocs/MUST-FOLLOW-GUIDELINES.md +283 -170
- package/dist/templates/monorepo/MUST-FOLLOW-GUIDELINES.md +283 -170
- package/dist/templates/react-starter/MUST-FOLLOW-GUIDELINES.md +1845 -0
- package/dist/templates/react-starter/README.md +100 -0
- package/dist/templates/react-starter/bun.lock +1298 -0
- package/dist/templates/react-starter/components.json +27 -0
- package/dist/templates/react-starter/eslint.config.js +23 -0
- package/dist/templates/react-starter/index.html +36 -0
- package/dist/templates/react-starter/package.json +57 -0
- package/dist/templates/react-starter/public/registry.json +115 -0
- package/dist/templates/react-starter/public/themes/darkmatteviolet-dark.css +34 -0
- package/dist/templates/react-starter/public/themes/darkmatteviolet-light.css +34 -0
- package/dist/templates/react-starter/public/themes/default-dark.css +33 -0
- package/dist/templates/react-starter/public/themes/default-light.css +34 -0
- package/dist/templates/react-starter/public/themes/graphite-dark.css +34 -0
- package/dist/templates/react-starter/public/themes/graphite-light.css +34 -0
- package/dist/templates/react-starter/public/themes/synthwave84-dark.css +34 -0
- package/dist/templates/react-starter/public/themes/synthwave84-light.css +34 -0
- package/dist/templates/react-starter/public/vite.svg +1 -0
- package/dist/templates/react-starter/src/App.tsx +245 -0
- package/dist/templates/react-starter/src/assets/react.svg +1 -0
- package/dist/templates/react-starter/src/components/ThemeSelector.tsx +106 -0
- package/dist/templates/react-starter/src/components/animate-ui/components/buttons/icon.tsx +86 -0
- package/dist/templates/react-starter/src/components/animate-ui/components/buttons/theme-toggler.tsx +92 -0
- package/dist/templates/react-starter/src/components/animate-ui/primitives/animate/slot.tsx +96 -0
- package/dist/templates/react-starter/src/components/animate-ui/primitives/buttons/button.tsx +31 -0
- package/dist/templates/react-starter/src/components/animate-ui/primitives/effects/particles.tsx +155 -0
- package/dist/templates/react-starter/src/components/animate-ui/primitives/effects/theme-toggler.tsx +148 -0
- package/dist/templates/react-starter/src/components/component-example.tsx +444 -0
- package/dist/templates/react-starter/src/components/example.tsx +56 -0
- package/dist/templates/react-starter/src/index.css +131 -0
- package/dist/templates/react-starter/src/main.tsx +13 -0
- package/dist/templates/react-starter/src/providers/ThemeProvider.tsx +27 -0
- package/dist/templates/react-starter/tsconfig.app.json +36 -0
- package/dist/templates/react-starter/tsconfig.json +13 -0
- package/dist/templates/react-starter/tsconfig.node.json +26 -0
- package/dist/templates/react-starter/vite.config.ts +17 -0
- package/dist/templates/telegram-bot/MUST-FOLLOW-GUIDELINES.md +283 -170
- package/package.json +1 -1
- package/templates/fumadocs/MUST-FOLLOW-GUIDELINES.md +283 -170
- package/templates/monorepo/MUST-FOLLOW-GUIDELINES.md +283 -170
- package/templates/react-starter/MUST-FOLLOW-GUIDELINES.md +1845 -0
- package/templates/react-starter/README.md +100 -0
- package/templates/react-starter/bun.lock +1298 -0
- package/templates/react-starter/components.json +27 -0
- package/templates/react-starter/eslint.config.js +23 -0
- package/templates/react-starter/index.html +36 -0
- package/templates/react-starter/package.json +57 -0
- package/templates/react-starter/public/registry.json +115 -0
- package/templates/react-starter/public/themes/darkmatteviolet-dark.css +34 -0
- package/templates/react-starter/public/themes/darkmatteviolet-light.css +34 -0
- package/templates/react-starter/public/themes/default-dark.css +33 -0
- package/templates/react-starter/public/themes/default-light.css +34 -0
- package/templates/react-starter/public/themes/graphite-dark.css +34 -0
- package/templates/react-starter/public/themes/graphite-light.css +34 -0
- package/templates/react-starter/public/themes/synthwave84-dark.css +34 -0
- package/templates/react-starter/public/themes/synthwave84-light.css +34 -0
- package/templates/react-starter/public/vite.svg +1 -0
- package/templates/react-starter/src/App.tsx +245 -0
- package/templates/react-starter/src/assets/react.svg +1 -0
- package/templates/react-starter/src/components/ThemeSelector.tsx +106 -0
- package/templates/react-starter/src/components/animate-ui/components/buttons/icon.tsx +86 -0
- package/templates/react-starter/src/components/animate-ui/components/buttons/theme-toggler.tsx +92 -0
- package/templates/react-starter/src/components/animate-ui/primitives/animate/slot.tsx +96 -0
- package/templates/react-starter/src/components/animate-ui/primitives/buttons/button.tsx +31 -0
- package/templates/react-starter/src/components/animate-ui/primitives/effects/particles.tsx +155 -0
- package/templates/react-starter/src/components/animate-ui/primitives/effects/theme-toggler.tsx +148 -0
- package/templates/react-starter/src/components/component-example.tsx +444 -0
- package/templates/react-starter/src/components/example.tsx +56 -0
- package/templates/react-starter/src/index.css +131 -0
- package/templates/react-starter/src/main.tsx +13 -0
- package/templates/react-starter/src/providers/ThemeProvider.tsx +27 -0
- package/templates/react-starter/tsconfig.app.json +36 -0
- package/templates/react-starter/tsconfig.json +13 -0
- package/templates/react-starter/tsconfig.node.json +26 -0
- package/templates/react-starter/vite.config.ts +17 -0
- package/templates/telegram-bot/MUST-FOLLOW-GUIDELINES.md +283 -170
package/dist/bin.js
CHANGED
|
@@ -5189,6 +5189,11 @@ async function selectTemplate(args) {
|
|
|
5189
5189
|
title: "Fumadocs - Documentaci\xF3n con Next.js + MDX + Fumadocs",
|
|
5190
5190
|
value: "fumadocs",
|
|
5191
5191
|
description: "Bilingual documentation site with GitHub Pages deployment"
|
|
5192
|
+
},
|
|
5193
|
+
{
|
|
5194
|
+
title: "React Starter - BaseUI + React 19 + Vite 8 + Theme Manager",
|
|
5195
|
+
value: "react-starter",
|
|
5196
|
+
description: "Opinionated React starter with animated UI components and theme management"
|
|
5192
5197
|
}
|
|
5193
5198
|
]
|
|
5194
5199
|
}, {
|
|
@@ -5444,6 +5449,69 @@ Operation cancelled`));
|
|
|
5444
5449
|
runInstall: args.noInstall ? false : response.runInstall ?? true
|
|
5445
5450
|
};
|
|
5446
5451
|
}
|
|
5452
|
+
async function promptReactStarter(args) {
|
|
5453
|
+
const gitUser = await getGitUser();
|
|
5454
|
+
const parsed = parseProjectArg(args.projectName);
|
|
5455
|
+
const response = await import_prompts.default([
|
|
5456
|
+
{
|
|
5457
|
+
type: args.projectName ? null : "text",
|
|
5458
|
+
name: "name",
|
|
5459
|
+
message: "Project name",
|
|
5460
|
+
initial: parsed.name,
|
|
5461
|
+
validate: (value) => {
|
|
5462
|
+
if (!value)
|
|
5463
|
+
return "Project name is required";
|
|
5464
|
+
if (!isValidProjectName(value)) {
|
|
5465
|
+
return "Invalid name. Use lowercase letters, numbers, and hyphens only";
|
|
5466
|
+
}
|
|
5467
|
+
return true;
|
|
5468
|
+
},
|
|
5469
|
+
format: (value) => value.toLowerCase().trim()
|
|
5470
|
+
},
|
|
5471
|
+
{
|
|
5472
|
+
type: args.description ? null : "text",
|
|
5473
|
+
name: "description",
|
|
5474
|
+
message: "Description",
|
|
5475
|
+
initial: "React app with BaseUI, theme management, and animated components"
|
|
5476
|
+
},
|
|
5477
|
+
{
|
|
5478
|
+
type: args.author ? null : "text",
|
|
5479
|
+
name: "author",
|
|
5480
|
+
message: "Author",
|
|
5481
|
+
initial: gitUser || "Anonymous"
|
|
5482
|
+
},
|
|
5483
|
+
{
|
|
5484
|
+
type: args.noGit ? null : "confirm",
|
|
5485
|
+
name: "initGit",
|
|
5486
|
+
message: "Initialize git repository?",
|
|
5487
|
+
initial: true
|
|
5488
|
+
},
|
|
5489
|
+
{
|
|
5490
|
+
type: args.noInstall ? null : "confirm",
|
|
5491
|
+
name: "runInstall",
|
|
5492
|
+
message: "Run bun install?",
|
|
5493
|
+
initial: true
|
|
5494
|
+
}
|
|
5495
|
+
], {
|
|
5496
|
+
onCancel: () => {
|
|
5497
|
+
console.log(kleur_default.red(`
|
|
5498
|
+
Operation cancelled`));
|
|
5499
|
+
process.exit(0);
|
|
5500
|
+
}
|
|
5501
|
+
});
|
|
5502
|
+
const name = args.projectName ? parsed.name : response.name;
|
|
5503
|
+
const targetDir = args.dir || `./${name}`;
|
|
5504
|
+
return {
|
|
5505
|
+
template: "react-starter",
|
|
5506
|
+
name,
|
|
5507
|
+
scope: "",
|
|
5508
|
+
description: args.description || response.description || "",
|
|
5509
|
+
author: args.author || response.author || gitUser || "Anonymous",
|
|
5510
|
+
targetDir,
|
|
5511
|
+
initGit: args.noGit ? false : response.initGit ?? true,
|
|
5512
|
+
runInstall: args.noInstall ? false : response.runInstall ?? true
|
|
5513
|
+
};
|
|
5514
|
+
}
|
|
5447
5515
|
async function promptUser(args, templateType) {
|
|
5448
5516
|
if (templateType === "telegram-bot") {
|
|
5449
5517
|
return promptTelegramBot(args);
|
|
@@ -5451,6 +5519,9 @@ async function promptUser(args, templateType) {
|
|
|
5451
5519
|
if (templateType === "fumadocs") {
|
|
5452
5520
|
return promptFumadocs(args);
|
|
5453
5521
|
}
|
|
5522
|
+
if (templateType === "react-starter") {
|
|
5523
|
+
return promptReactStarter(args);
|
|
5524
|
+
}
|
|
5454
5525
|
return promptMonorepo(args);
|
|
5455
5526
|
}
|
|
5456
5527
|
async function getDefaultsMonorepo(args) {
|
|
@@ -5512,8 +5583,26 @@ async function getDefaults(args, templateType) {
|
|
|
5512
5583
|
if (templateType === "fumadocs") {
|
|
5513
5584
|
return getDefaultsFumadocs(args);
|
|
5514
5585
|
}
|
|
5586
|
+
if (templateType === "react-starter") {
|
|
5587
|
+
return getDefaultsReactStarter(args);
|
|
5588
|
+
}
|
|
5515
5589
|
return getDefaultsMonorepo(args);
|
|
5516
5590
|
}
|
|
5591
|
+
async function getDefaultsReactStarter(args) {
|
|
5592
|
+
const gitUser = await getGitUser();
|
|
5593
|
+
const parsed = parseProjectArg(args.projectName);
|
|
5594
|
+
const targetDir = args.dir || parsed.targetDir;
|
|
5595
|
+
return {
|
|
5596
|
+
template: "react-starter",
|
|
5597
|
+
name: parsed.name,
|
|
5598
|
+
scope: "",
|
|
5599
|
+
description: args.description || "React app with BaseUI, theme management, and animated components",
|
|
5600
|
+
author: args.author || gitUser || "Anonymous",
|
|
5601
|
+
targetDir,
|
|
5602
|
+
initGit: !args.noGit,
|
|
5603
|
+
runInstall: !args.noInstall
|
|
5604
|
+
};
|
|
5605
|
+
}
|
|
5517
5606
|
|
|
5518
5607
|
// src/generator.ts
|
|
5519
5608
|
import { mkdir, readdir, stat as stat2, readFile as readFile2, writeFile as writeFile2, copyFile, rename } from "fs/promises";
|
|
@@ -5692,6 +5781,8 @@ var TEXT_EXTENSIONS = new Set([
|
|
|
5692
5781
|
".yml",
|
|
5693
5782
|
".yaml",
|
|
5694
5783
|
".toml",
|
|
5784
|
+
".html",
|
|
5785
|
+
".css",
|
|
5695
5786
|
".gitignore",
|
|
5696
5787
|
".prettierrc",
|
|
5697
5788
|
".prettierignore",
|
|
@@ -5803,6 +5894,15 @@ function generatePlaceholders(config, templateType) {
|
|
|
5803
5894
|
SUPPORTED_LOCALES: config.supportedLocales || "es,en"
|
|
5804
5895
|
};
|
|
5805
5896
|
}
|
|
5897
|
+
if (templateType === "react-starter") {
|
|
5898
|
+
const projectTitle = config.name.split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
5899
|
+
return {
|
|
5900
|
+
...base,
|
|
5901
|
+
PROJECT_NAME: config.name,
|
|
5902
|
+
PROJECT_TITLE: projectTitle,
|
|
5903
|
+
DESCRIPTION: config.description
|
|
5904
|
+
};
|
|
5905
|
+
}
|
|
5806
5906
|
throw new Error(`Unknown template: ${templateType}`);
|
|
5807
5907
|
}
|
|
5808
5908
|
async function copyTemplateDir(src, dest, placeholders) {
|