create-bunspace 0.2.0 → 0.2.2
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
CHANGED
|
@@ -5516,7 +5516,7 @@ async function getDefaults(args, templateType) {
|
|
|
5516
5516
|
}
|
|
5517
5517
|
|
|
5518
5518
|
// src/generator.ts
|
|
5519
|
-
import { mkdir, readdir, stat, readFile, writeFile, copyFile } from "fs/promises";
|
|
5519
|
+
import { mkdir, readdir, stat, readFile, writeFile, copyFile, rename } from "fs/promises";
|
|
5520
5520
|
import { join, dirname } from "path";
|
|
5521
5521
|
import { existsSync } from "fs";
|
|
5522
5522
|
var TEXT_EXTENSIONS = new Set([
|
|
@@ -5582,6 +5582,13 @@ async function generateProject(config, templateType) {
|
|
|
5582
5582
|
await mkdir(targetDir, { recursive: true });
|
|
5583
5583
|
printStep("Copying template files...");
|
|
5584
5584
|
await copyTemplateDir(templateDir, targetDir, placeholders);
|
|
5585
|
+
if (templateType === "fumadocs") {
|
|
5586
|
+
const contentTemplatePath = join(targetDir, "content-template");
|
|
5587
|
+
const contentPath = join(targetDir, "content");
|
|
5588
|
+
if (existsSync(contentTemplatePath)) {
|
|
5589
|
+
await rename(contentTemplatePath, contentPath);
|
|
5590
|
+
}
|
|
5591
|
+
}
|
|
5585
5592
|
if (config.initGit) {
|
|
5586
5593
|
printStep("Initializing git repository...");
|
|
5587
5594
|
await initGit(targetDir);
|
package/package.json
CHANGED