spine-framework 0.3.75 → 0.3.76
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.
|
@@ -48,19 +48,29 @@ if [ -f "$PROJECT_ROOT/.framework/index.html" ]; then
|
|
|
48
48
|
echo " ✓ Core: index.html (paths fixed)"
|
|
49
49
|
fi
|
|
50
50
|
|
|
51
|
-
# 3. Copy public assets from .framework
|
|
51
|
+
# 3. Copy public assets from .framework
|
|
52
|
+
# Vite's publicDir is set to PROJECT_ROOT/public (i.e. ../public relative to .assembled/src)
|
|
53
|
+
# so static files must go there to be served at the root URL
|
|
54
|
+
VITE_PUBLIC_DIR="$PROJECT_ROOT/public"
|
|
52
55
|
if [ -d "$PROJECT_ROOT/.framework/public" ]; then
|
|
53
|
-
mkdir -p "$
|
|
54
|
-
cp -r "$PROJECT_ROOT/.framework/public"/* "$
|
|
56
|
+
mkdir -p "$VITE_PUBLIC_DIR"
|
|
57
|
+
cp -r "$PROJECT_ROOT/.framework/public"/* "$VITE_PUBLIC_DIR/" 2>/dev/null || true
|
|
55
58
|
echo " ✓ Core: $(find "$PROJECT_ROOT/.framework/public" -type f | wc -l | tr -d ' ') public files"
|
|
56
59
|
fi
|
|
57
60
|
|
|
58
|
-
# 3.5. Copy _redirects to Vite-served
|
|
61
|
+
# 3.5. Copy _redirects to Vite-served root for Netlify dev (served from .assembled/src root)
|
|
59
62
|
if [ -f "$PROJECT_ROOT/.framework/public/_redirects" ]; then
|
|
60
63
|
cp "$PROJECT_ROOT/.framework/public/_redirects" "$TARGET_SRC_DIR/_redirects"
|
|
61
64
|
echo " ✓ Core: _redirects copied to Vite-served directory for Netlify dev"
|
|
62
65
|
fi
|
|
63
66
|
|
|
67
|
+
# 3.6. Copy spine.config.json to Vite publicDir so it's served at /spine.config.json
|
|
68
|
+
if [ -f "$PROJECT_ROOT/spine.config.json" ]; then
|
|
69
|
+
mkdir -p "$VITE_PUBLIC_DIR"
|
|
70
|
+
cp "$PROJECT_ROOT/spine.config.json" "$VITE_PUBLIC_DIR/spine.config.json"
|
|
71
|
+
echo " ✓ Config: spine.config.json copied to public/"
|
|
72
|
+
fi
|
|
73
|
+
|
|
64
74
|
# 6. Overlay custom src (overrides + additions)
|
|
65
75
|
if [ -d "$CUSTOM_SRC_DIR" ]; then
|
|
66
76
|
# Copy files and subdirectories
|
package/package.json
CHANGED
|
@@ -48,23 +48,26 @@ if [ -f "$PROJECT_ROOT/.framework/index.html" ]; then
|
|
|
48
48
|
echo " ✓ Core: index.html (paths fixed)"
|
|
49
49
|
fi
|
|
50
50
|
|
|
51
|
-
# 3. Copy public assets from .framework
|
|
51
|
+
# 3. Copy public assets from .framework
|
|
52
|
+
# Vite's publicDir is set to PROJECT_ROOT/public (i.e. ../public relative to .assembled/src)
|
|
53
|
+
# so static files must go there to be served at the root URL
|
|
54
|
+
VITE_PUBLIC_DIR="$PROJECT_ROOT/public"
|
|
52
55
|
if [ -d "$PROJECT_ROOT/.framework/public" ]; then
|
|
53
|
-
mkdir -p "$
|
|
54
|
-
cp -r "$PROJECT_ROOT/.framework/public"/* "$
|
|
56
|
+
mkdir -p "$VITE_PUBLIC_DIR"
|
|
57
|
+
cp -r "$PROJECT_ROOT/.framework/public"/* "$VITE_PUBLIC_DIR/" 2>/dev/null || true
|
|
55
58
|
echo " ✓ Core: $(find "$PROJECT_ROOT/.framework/public" -type f | wc -l | tr -d ' ') public files"
|
|
56
59
|
fi
|
|
57
60
|
|
|
58
|
-
# 3.5. Copy _redirects to Vite-served
|
|
61
|
+
# 3.5. Copy _redirects to Vite-served root for Netlify dev (served from .assembled/src root)
|
|
59
62
|
if [ -f "$PROJECT_ROOT/.framework/public/_redirects" ]; then
|
|
60
63
|
cp "$PROJECT_ROOT/.framework/public/_redirects" "$TARGET_SRC_DIR/_redirects"
|
|
61
64
|
echo " ✓ Core: _redirects copied to Vite-served directory for Netlify dev"
|
|
62
65
|
fi
|
|
63
66
|
|
|
64
|
-
# 3.6. Copy spine.config.json to
|
|
67
|
+
# 3.6. Copy spine.config.json to Vite publicDir so it's served at /spine.config.json
|
|
65
68
|
if [ -f "$PROJECT_ROOT/spine.config.json" ]; then
|
|
66
|
-
mkdir -p "$
|
|
67
|
-
cp "$PROJECT_ROOT/spine.config.json" "$
|
|
69
|
+
mkdir -p "$VITE_PUBLIC_DIR"
|
|
70
|
+
cp "$PROJECT_ROOT/spine.config.json" "$VITE_PUBLIC_DIR/spine.config.json"
|
|
68
71
|
echo " ✓ Config: spine.config.json copied to public/"
|
|
69
72
|
fi
|
|
70
73
|
|