@schandlergarcia/sf-web-components 1.2.11 → 1.2.12
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/package.json +1 -1
- package/scripts/postinstall.mjs +18 -0
package/package.json
CHANGED
package/scripts/postinstall.mjs
CHANGED
|
@@ -82,6 +82,24 @@ if (fs.existsSync(sourceLibDir)) {
|
|
|
82
82
|
console.log(` ✓ Copied ${libFilesCopied} lib files\n`);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
+
// Copy workspace directory (ComponentRegistry, etc.)
|
|
86
|
+
const sourceWorkspaceDir = path.join(packageRoot, 'src/components/workspace');
|
|
87
|
+
const targetWorkspaceDir = path.join(cwd, 'src/components/workspace');
|
|
88
|
+
|
|
89
|
+
if (fs.existsSync(sourceWorkspaceDir)) {
|
|
90
|
+
const workspaceFilesCopied = copyDirectoryRecursive(sourceWorkspaceDir, targetWorkspaceDir);
|
|
91
|
+
console.log(` ✓ Copied ${workspaceFilesCopied} workspace files\n`);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Copy pages directory (sample pages, etc.)
|
|
95
|
+
const sourcePagesDir = path.join(packageRoot, 'src/components/pages');
|
|
96
|
+
const targetPagesDir = path.join(cwd, 'src/components/pages');
|
|
97
|
+
|
|
98
|
+
if (fs.existsSync(sourcePagesDir)) {
|
|
99
|
+
const pagesFilesCopied = copyDirectoryRecursive(sourcePagesDir, targetPagesDir);
|
|
100
|
+
console.log(` ✓ Copied ${pagesFilesCopied} component pages\n`);
|
|
101
|
+
}
|
|
102
|
+
|
|
85
103
|
// Update imports in existing files to use local library
|
|
86
104
|
const files = glob.sync('src/**/*.{ts,tsx,js,jsx}', {
|
|
87
105
|
cwd,
|