Skip to content
Snippets Groups Projects
Commit c0147781 authored by Marcus Schiesser's avatar Marcus Schiesser
Browse files

fix: ensure that no HTML component files are copied if shadcn is selected

parent 9d5248d7
No related branches found
No related tags found
No related merge requests found
Using the chat component from https://github.com/marcusschiesser/ui (based on https://ui.shadcn.com/)
......@@ -99,11 +99,14 @@ const installTSTemplate = async ({
/**
* Copy the selected UI files to the target directory and reference it.
*/
if (framework === "nextjs") {
if (framework === "nextjs" && ui !== "html") {
console.log("\nUsing UI:", ui, "\n");
const uiPath = path.join(compPath, "ui", ui);
const componentsPath = path.join("app", "components");
await copy("**", path.join(root, componentsPath, "ui"), {
const destUiPath = path.join(root, "app", "components", "ui");
// remove the default ui folder
await fs.rm(destUiPath, { recursive: true });
// copy the selected ui folder
await copy("**", destUiPath, {
parents: true,
cwd: uiPath,
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment