shadcn-extras 0.1.3 → 0.2.1
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 +3 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -109,8 +109,8 @@ commander_1.program
|
|
|
109
109
|
for (const file of componentEntry.files) {
|
|
110
110
|
const content = file.content ||
|
|
111
111
|
(await fetchFile(`${MOTION_PRIMITIVES_BASE_URL}${file.path}`));
|
|
112
|
-
const
|
|
113
|
-
allFiles.push({ path:
|
|
112
|
+
const relPath = (0, path_1.normalize)(file.path);
|
|
113
|
+
allFiles.push({ path: relPath, content });
|
|
114
114
|
}
|
|
115
115
|
// Create target directory if it doesn't exist
|
|
116
116
|
if (!(0, fs_1.existsSync)(TARGET_DIR)) {
|
|
@@ -119,6 +119,7 @@ commander_1.program
|
|
|
119
119
|
// Write all files to components/shadcn-extras/
|
|
120
120
|
for (const { path, content } of allFiles) {
|
|
121
121
|
const filePath = (0, path_1.join)(TARGET_DIR, path);
|
|
122
|
+
(0, fs_1.mkdirSync)((0, path_1.dirname)(filePath), { recursive: true });
|
|
122
123
|
(0, fs_1.writeFileSync)(filePath, content);
|
|
123
124
|
console.log(`✓ Added ${path} to ${filePath}`);
|
|
124
125
|
}
|