@schandlergarcia/sf-web-components 1.2.14 → 1.2.16
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
CHANGED
package/scripts/postinstall.mjs
CHANGED
|
@@ -93,10 +93,10 @@ if (fs.existsSync(sourceWorkspaceDir)) {
|
|
|
93
93
|
|
|
94
94
|
// Copy pages directory (sample pages, etc.)
|
|
95
95
|
const sourcePagesDir = path.join(packageRoot, 'src/components/pages');
|
|
96
|
-
const
|
|
96
|
+
const targetComponentPagesDir = path.join(cwd, 'src/components/pages');
|
|
97
97
|
|
|
98
98
|
if (fs.existsSync(sourcePagesDir)) {
|
|
99
|
-
const pagesFilesCopied = copyDirectoryRecursive(sourcePagesDir,
|
|
99
|
+
const pagesFilesCopied = copyDirectoryRecursive(sourcePagesDir, targetComponentPagesDir);
|
|
100
100
|
console.log(` ✓ Copied ${pagesFilesCopied} component pages\n`);
|
|
101
101
|
}
|
|
102
102
|
|
|
@@ -15,7 +15,15 @@
|
|
|
15
15
|
#
|
|
16
16
|
set -euo pipefail
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
# When run from npm script, use the current working directory (the consuming project)
|
|
19
|
+
# When run directly from the package, navigate to parent
|
|
20
|
+
if [ -d "node_modules/@schandlergarcia/sf-web-components" ]; then
|
|
21
|
+
# Running from consuming project
|
|
22
|
+
ROOT="$PWD"
|
|
23
|
+
else
|
|
24
|
+
# Running from package itself
|
|
25
|
+
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
26
|
+
fi
|
|
19
27
|
cd "$ROOT"
|
|
20
28
|
|
|
21
29
|
echo ""
|
|
@@ -10,7 +10,15 @@
|
|
|
10
10
|
#
|
|
11
11
|
set -euo pipefail
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
# When run from npm script, use the current working directory (the consuming project)
|
|
14
|
+
# When run directly from the package, navigate to parent
|
|
15
|
+
if [ -d "node_modules/@schandlergarcia/sf-web-components" ]; then
|
|
16
|
+
# Running from consuming project
|
|
17
|
+
ROOT="$PWD"
|
|
18
|
+
else
|
|
19
|
+
# Running from package itself
|
|
20
|
+
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
21
|
+
fi
|
|
14
22
|
cd "$ROOT"
|
|
15
23
|
|
|
16
24
|
PAGES_DIR="src/components/pages"
|