@pennyfarthing/core 8.0.1 → 8.0.2
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
|
@@ -29,8 +29,9 @@ fi
|
|
|
29
29
|
_real_script_dir="$(cd "$SCRIPT_DIR" && pwd -P)"
|
|
30
30
|
|
|
31
31
|
# Derive package root from script location
|
|
32
|
-
# Scripts
|
|
33
|
-
#
|
|
32
|
+
# Scripts can be in:
|
|
33
|
+
# - pennyfarthing-dist/scripts/<category>/ (npm package or framework dev)
|
|
34
|
+
# - .pennyfarthing/scripts/<category>/ (consumer project after init)
|
|
34
35
|
if [[ "$_real_script_dir" == */pennyfarthing-dist/scripts/* ]]; then
|
|
35
36
|
# Extract everything before /pennyfarthing-dist/scripts/
|
|
36
37
|
_pkg_root="${_real_script_dir%/pennyfarthing-dist/scripts/*}"
|
|
@@ -46,8 +47,12 @@ if [[ "$_real_script_dir" == */pennyfarthing-dist/scripts/* ]]; then
|
|
|
46
47
|
else
|
|
47
48
|
PROJECT_ROOT="$_pkg_root"
|
|
48
49
|
fi
|
|
50
|
+
elif [[ "$_real_script_dir" == */.pennyfarthing/scripts/* ]]; then
|
|
51
|
+
# Consumer project context: scripts copied to .pennyfarthing/scripts/
|
|
52
|
+
# Extract everything before /.pennyfarthing/scripts/
|
|
53
|
+
PROJECT_ROOT="${_real_script_dir%/.pennyfarthing/scripts/*}"
|
|
49
54
|
else
|
|
50
|
-
echo "Error: Script not in expected location (pennyfarthing-dist/scripts
|
|
55
|
+
echo "Error: Script not in expected location (pennyfarthing-dist/scripts/ or .pennyfarthing/scripts/)" >&2
|
|
51
56
|
echo "SCRIPT_DIR=$_real_script_dir" >&2
|
|
52
57
|
exit 1
|
|
53
58
|
fi
|