Skip to content

Commit 0c6d1bb

Browse files
committed
fix(cli): copy folder fn
1 parent 43f5f75 commit 0c6d1bb

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

apps/cli/scripts/generate-source-files.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { copyFolder } from '../src/utils/copy-folder';
88

99
async function main() {
1010
for (const template of TEMPLATES) {
11-
await copyFolder(template.path, template.name);
11+
await copyFolder(template.path, path.join('__generated', template.name));
1212
}
1313
for (const comp of COMPONENTS) {
1414
if (Array.isArray(comp.paths)) {

apps/cli/src/utils/copy-folder.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
import { existsSync, promises as fs } from 'fs';
22
import path from 'path';
33

4-
export async function copyFolder(src: string, name: string, destPath?: string) {
4+
export async function copyFolder(src: string, dest: string) {
55
if (!existsSync(src)) {
66
throw new Error(`Source folder does not exist: ${src}`);
77
}
88

9-
const dest = destPath ?? path.join('__generated', name);
10-
119
if (!existsSync(dest)) {
1210
await fs.mkdir(dest, { recursive: true });
1311
}

0 commit comments

Comments
 (0)