wip: make collectstatic happy with import() in comments

Also add missing .map files.

Maybe a proper solution would be to commit the vendors/ and
remove manually the comments.
This commit is contained in:
Yohan Boniface 2024-06-26 21:13:34 +02:00
parent ca0f771947
commit 891f04656f
2 changed files with 3 additions and 1 deletions

View file

@ -20,7 +20,9 @@ mkdir -p umap/static/umap/vendors/measurable/ && cp -r node_modules/leaflet-meas
mkdir -p umap/static/umap/vendors/photon/ && cp -r node_modules/leaflet.photon/leaflet.photon.js umap/static/umap/vendors/photon/
mkdir -p umap/static/umap/vendors/csv2geojson/ && cp -r node_modules/csv2geojson/csv2geojson.js umap/static/umap/vendors/csv2geojson/
mkdir -p umap/static/umap/vendors/togeojson/ && cp node_modules/@tmcw/togeojson/dist/togeojson.es.mjs umap/static/umap/vendors/togeojson/togeojson.es.js
mkdir -p umap/static/umap/vendors/togeojson/ && cp node_modules/@tmcw/togeojson/dist/togeojson.es.mjs.map umap/static/umap/vendors/togeojson/togeojson.es.mjs.map
mkdir -p umap/static/umap/vendors/tokml/ && cp node_modules/@placemarkio/tokml/dist/tokml.es.mjs umap/static/umap/vendors/tokml/tokml.es.js
mkdir -p umap/static/umap/vendors/tokml/ && cp node_modules/@placemarkio/tokml/dist/tokml.es.mjs.map umap/static/umap/vendors/tokml/tokml.es.mjs.map
mkdir -p umap/static/umap/vendors/osmtogeojson/ && cp -r node_modules/osmtogeojson/osmtogeojson.js umap/static/umap/vendors/osmtogeojson/
mkdir -p umap/static/umap/vendors/georsstogeojson/ && cp -r node_modules/georsstogeojson/GeoRSSToGeoJSON.js umap/static/umap/vendors/georsstogeojson/
mkdir -p umap/static/umap/vendors/locatecontrol/ && cp -r node_modules/leaflet.locatecontrol/dist/L.Control.Locate.min.* umap/static/umap/vendors/locatecontrol/

View file

@ -32,7 +32,7 @@ class UmapManifestStaticFilesStorage(ManifestStaticFilesStorage):
'import"%(url)s"\n',
),
(
r"""(?P<matched>import\(["'](?P<url>.*?)["']\))""",
r"""(?P<matched>import\(["'](?P<url>.*?)["']\))\.then""",
"""import("%(url)s")""",
),
),