create-kofi-stack 2.1.33 → 2.1.35
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 +18 -1
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -394,6 +394,22 @@ function getShadcnBaseColor(config) {
|
|
|
394
394
|
const validColors = ["neutral", "gray", "zinc", "stone", "slate"];
|
|
395
395
|
return validColors.includes(baseColor) ? baseColor : "neutral";
|
|
396
396
|
}
|
|
397
|
+
function buildShadcnPresetUrl(config) {
|
|
398
|
+
const shadcn = config.shadcn || {};
|
|
399
|
+
const params = new URLSearchParams({
|
|
400
|
+
base: shadcn.componentLibrary || "base",
|
|
401
|
+
style: shadcn.style || "nova",
|
|
402
|
+
baseColor: shadcn.baseColor || "neutral",
|
|
403
|
+
theme: shadcn.themeColor || "neutral",
|
|
404
|
+
iconLibrary: shadcn.iconLibrary || "hugeicons",
|
|
405
|
+
font: shadcn.font || "inter",
|
|
406
|
+
menuAccent: shadcn.menuAccent || "subtle",
|
|
407
|
+
menuColor: shadcn.menuColor || "default",
|
|
408
|
+
radius: shadcn.radius || "default",
|
|
409
|
+
template: "next"
|
|
410
|
+
});
|
|
411
|
+
return `https://ui.shadcn.com/init?${params.toString()}`;
|
|
412
|
+
}
|
|
397
413
|
async function updateEnvWithSecrets(envPath, secrets) {
|
|
398
414
|
if (!await fs.pathExists(envPath)) {
|
|
399
415
|
return;
|
|
@@ -417,10 +433,11 @@ async function generateProject(config, options = {}) {
|
|
|
417
433
|
console.log();
|
|
418
434
|
try {
|
|
419
435
|
const baseColor = getShadcnBaseColor(config);
|
|
436
|
+
const presetUrl = buildShadcnPresetUrl(config);
|
|
420
437
|
if (config.structure === "standalone") {
|
|
421
438
|
spinner.start("Creating project with shadcn/ui...");
|
|
422
439
|
try {
|
|
423
|
-
await execa("pnpm", ["dlx", "shadcn@latest", "create", config.projectName, "--
|
|
440
|
+
await execa("pnpm", ["dlx", "shadcn@latest", "create", config.projectName, "--preset", presetUrl], {
|
|
424
441
|
cwd: path2.dirname(config.targetDir),
|
|
425
442
|
stdio: "pipe"
|
|
426
443
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-kofi-stack",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.35",
|
|
4
4
|
"description": "Scaffold opinionated full-stack projects with Next.js, Convex, Better-Auth, and more",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -9,8 +9,14 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
"dist"
|
|
11
11
|
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "tsup src/index.ts --format esm --dts",
|
|
14
|
+
"dev": "tsup src/index.ts --format esm --watch",
|
|
15
|
+
"start": "node dist/index.js",
|
|
16
|
+
"typecheck": "tsc --noEmit"
|
|
17
|
+
},
|
|
12
18
|
"dependencies": {
|
|
13
|
-
"kofi-stack-template-generator": "^2.1.
|
|
19
|
+
"kofi-stack-template-generator": "^2.1.28",
|
|
14
20
|
"kofi-stack-types": "^2.2.0",
|
|
15
21
|
"@clack/prompts": "^0.7.0",
|
|
16
22
|
"commander": "^12.0.0",
|
|
@@ -50,11 +56,5 @@
|
|
|
50
56
|
"bugs": {
|
|
51
57
|
"url": "https://github.com/theodenanyoh11/create-kofi-stack/issues"
|
|
52
58
|
},
|
|
53
|
-
"homepage": "https://github.com/theodenanyoh11/create-kofi-stack#readme"
|
|
54
|
-
|
|
55
|
-
"build": "tsup src/index.ts --format esm --dts",
|
|
56
|
-
"dev": "tsup src/index.ts --format esm --watch",
|
|
57
|
-
"start": "node dist/index.js",
|
|
58
|
-
"typecheck": "tsc --noEmit"
|
|
59
|
-
}
|
|
60
|
-
}
|
|
59
|
+
"homepage": "https://github.com/theodenanyoh11/create-kofi-stack#readme"
|
|
60
|
+
}
|