MapComplete/scripts/fixPannellum.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
402 B
Bash
Raw Normal View History

#! /bin/bash
# Are you ready to feel really dirty?
# Pannellum is a direct import (not a module!) which uses window.pannellum = function...
# This breaks when importing this in nodeJS
# So, we patch it up...
echo "Fixing pannellum..."
sed -i 's/^window./if(typeof window !== "undefined")\n&/' "./node_modules/pannellum/build/pannellum.js"
2025-03-30 15:18:20 +02:00
cp ./node_modules/pannellum/build/pannellum.css ./public/css/