mirror of
https://github.com/AnmolSaini16/mapcn
synced 2026-04-28 08:57:03 +02:00
feat: add blocks showcase and restructure app
This commit is contained in:
11
src/lib/get-block-file-source.ts
Normal file
11
src/lib/get-block-file-source.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
|
||||
const SRC_DIR = process.cwd();
|
||||
|
||||
export function getBlockFileSource(registryPath: string): string {
|
||||
const filePath = path.join(SRC_DIR, registryPath);
|
||||
const source = fs.readFileSync(filePath, "utf-8");
|
||||
|
||||
return source.replace(/@\/registry\/map/g, "@/components/ui/map");
|
||||
}
|
||||
Reference in New Issue
Block a user