Merge master

This commit is contained in:
Pieter Vander Vennet 2025-04-27 00:34:30 +02:00
commit b61f930fea
39 changed files with 525 additions and 22753 deletions

View file

@ -126,7 +126,7 @@ class DownloadEli extends Script {
fs.writeFileSync(targetGlobal, JSON.stringify(contentsGlobal, null, " "), {
encoding: "utf8",
})
console.log("Written", keptGlobalLayers.length + ", entries to the global ELI")
console.log("Written", keptGlobalLayers.length + ", entries to the global ELI ("+targetGlobal+")")
}
}

View file

@ -211,7 +211,7 @@ class NsiLogos extends Script {
const config: LayerConfigJson = {
id: "nsi_" + type,
description: {
en: "Exposes part of the NSI to reuse in other themes, e.g. for rendering",
en: "Exposes part of the NSI to reuse in other themes, e.g. for rendering. Automatically generated and never directly loaded in a theme",
},
source: "special:library",
pointRendering: null,

View file

@ -8,7 +8,18 @@ then
npm run generate:layeroverview
npm run generate:layouts
fi
vite-node scripts/nsiLogos.ts -- patch
echo '''
{
"nsi_logos_server": "https://mapcomplete.org/assets/data/nsi/logos/"
}
''' > config.json
cat config.json | jq
if [ $? -ne 0 ]
then
echo "config.json file is invalid, exiting now"
tput bel
exit 0
fi
npm run build
echo '''
import type { CapacitorConfig } from "@capacitor/cli";
@ -22,6 +33,7 @@ const config: CapacitorConfig = {
export default config;
''' > capacitor.config.ts
# copy distribution files
rm -rf dist-full
mkdir dist-full
@ -51,6 +63,11 @@ cp -r dist/assets/svg dist-full/assets/
cp -r dist/assets/templates dist-full/assets/
cp -r dist/assets/generated/themes/ dist-full/assets/generated/
cp -r dist/assets/themes dist-full/assets/
cp dist/assets/*.js.map dist-full/assets/
rm -rf dist-full/assets/data/nsi
rm /home/pietervdvn/git/MapComplete/dist-full/assets/layers/nsi_brand/nsi_brand.json
rm /home/pietervdvn/git/MapComplete/dist-full/assets/layers/nsi_operator/nsi_operator.json
# mkdir dist-full/assets/generated
nvm use
@ -59,7 +76,8 @@ nvm use
npx capacitor-assets generate
npx cap sync
cd android
npm run clean
echo "All done! Don't forget to click 'gradle sync files' in Android Studio"
tput bel
tput bel