@sociallane/elements 1.0.3 → 1.0.5
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/install.js +12 -2
package/package.json
CHANGED
package/scripts/install.js
CHANGED
|
@@ -112,6 +112,8 @@ function install(targetPath, minimal) {
|
|
|
112
112
|
|
|
113
113
|
console.log('SocialLane Elements installer' + (minimal ? ' (minimal – add widgets with: npx @sociallane/elements add <slug> ...)' : ''));
|
|
114
114
|
console.log('Target:', target);
|
|
115
|
+
console.log('Package root:', packageRoot);
|
|
116
|
+
console.log('Package root files:', readdirSync(packageRoot).slice(0, 10).join(', ') + '...');
|
|
115
117
|
|
|
116
118
|
if (isSelf) {
|
|
117
119
|
console.log('Target is the current package. Running npm install here...');
|
|
@@ -121,9 +123,17 @@ function install(targetPath, minimal) {
|
|
|
121
123
|
console.log('Copying package...');
|
|
122
124
|
if (minimal) {
|
|
123
125
|
copyPackage(target, (src) => {
|
|
124
|
-
if (src.includes('node_modules'))
|
|
126
|
+
if (src.includes('node_modules')) {
|
|
127
|
+
console.log('EXCLUDE node_modules:', src);
|
|
128
|
+
return false;
|
|
129
|
+
}
|
|
125
130
|
const rel = path.relative(packageRoot, src).split(path.sep).join('/');
|
|
126
|
-
|
|
131
|
+
const exclude = rel === 'packages/widgets' || rel.startsWith('packages/widgets/');
|
|
132
|
+
if (exclude) {
|
|
133
|
+
console.log('EXCLUDE packages/widgets:', rel);
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
136
|
+
return true;
|
|
127
137
|
});
|
|
128
138
|
const widgetsDest = path.join(target, 'packages', 'widgets');
|
|
129
139
|
if (!existsSync(widgetsDest)) {
|