forked from MapComplete/MapComplete
Fix the build
This commit is contained in:
parent
fd30c44352
commit
e1791d3acb
3 changed files with 54 additions and 113 deletions
|
@ -1,21 +1,13 @@
|
|||
{
|
||||
"id": "mapcomplete-changes",
|
||||
"title": {
|
||||
"en": "Changes made with MapComplete",
|
||||
"de": "Mit MapComplete vorgenommene Änderungen",
|
||||
"nl": "Wijzigingen gemaakt met MapComplete"
|
||||
"en": "Changes made with MapComplete"
|
||||
},
|
||||
"shortDescription": {
|
||||
"en": "Shows changes made by MapComplete",
|
||||
"de": "Zeigt Änderungen, die von MapComplete vorgenommen wurden",
|
||||
"nl": "Toont wijzigingen gemaakt met MapComplete"
|
||||
"en": "Shows changes made by MapComplete"
|
||||
},
|
||||
"description": {
|
||||
"en": "This map shows all the changes made with MapComplete",
|
||||
"ca": "Aquest mapa mostra tots els canvis fets amb MapComplete",
|
||||
"de": "Diese Karte zeigt alle mit MapComplete vorgenommenen Änderungen",
|
||||
"fr": "Cette carte montre tous les changements faits avec MapComplete",
|
||||
"nl": "Deze kaart toont alle wijzigingen gemaakt met MapComplete"
|
||||
"en": "This maps shows all the changes made with MapComplete"
|
||||
},
|
||||
"icon": "./assets/svg/logo.svg",
|
||||
"hideFromOverview": true,
|
||||
|
@ -28,10 +20,7 @@
|
|||
{
|
||||
"id": "mapcomplete-changes",
|
||||
"name": {
|
||||
"en": "Changeset centers",
|
||||
"de": "Zentrum der Änderungssätze",
|
||||
"fr": "Centres de modifications de paramètres",
|
||||
"nl": "Middelpunt van de wijzigingenset"
|
||||
"en": "Changeset centers"
|
||||
},
|
||||
"minzoom": 0,
|
||||
"source": {
|
||||
|
@ -42,58 +31,41 @@
|
|||
},
|
||||
"title": {
|
||||
"render": {
|
||||
"en": "Changeset for {theme}",
|
||||
"de": "Änderungssatz für {theme}",
|
||||
"nl": "Changeset voor {theme}"
|
||||
"en": "Changeset for {theme}"
|
||||
}
|
||||
},
|
||||
"description": {
|
||||
"en": "Shows all MapComplete changes",
|
||||
"de": "Zeigt alle MapComplete-Änderungen",
|
||||
"fr": "Montre tous les changements de MapComplete",
|
||||
"nl": "Toon alle MapComplete wijzigingen"
|
||||
"en": "Shows all MapComplete changes"
|
||||
},
|
||||
"tagRenderings": [
|
||||
{
|
||||
"id": "show_changeset_id",
|
||||
"render": {
|
||||
"en": "Changeset <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>",
|
||||
"de": "Änderungssatz <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>",
|
||||
"nl": "Wijzigingenset <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>"
|
||||
"en": "Changeset <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "contributor",
|
||||
"question": {
|
||||
"en": "What contributor did make this change?",
|
||||
"de": "Welcher Mitwirkende hat diese Änderung vorgenommen?",
|
||||
"fr": "Quel contributeur a fait ce changement ?",
|
||||
"nl": "Welke bijdrager maakte deze wijziging?"
|
||||
"en": "What contributor did make this change?"
|
||||
},
|
||||
"freeform": {
|
||||
"key": "user"
|
||||
},
|
||||
"render": {
|
||||
"en": "Change made by <a href='https://openstreetmap.org/user/{user}' target='_blank'>{user}</a>",
|
||||
"de": "Änderung vorgenommen von <a href='https://openstreetmap.org/user/{user}' target='_blank'>{user}</a>",
|
||||
"fr": "Modification faite par <a href='https://openstreetmap.org/user/{user}' target='_blank'>{user}</a>",
|
||||
"nl": "Wijziging gemaakt door <a href='https://openstreetmap.org/user/{user}' target='_blank'>{user}</a>"
|
||||
"en": "Change made by <a href='https://openstreetmap.org/user/{user}' target='_blank'>{user}</a>"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "theme-id",
|
||||
"question": {
|
||||
"en": "What theme was used to make this change?",
|
||||
"de": "Welches Thema wurde für diese Änderung verwendet?",
|
||||
"nl": "Welk thema is gebruikt voor deze wijziging?"
|
||||
"en": "What theme was used to make this change?"
|
||||
},
|
||||
"freeform": {
|
||||
"key": "theme"
|
||||
},
|
||||
"render": {
|
||||
"en": "Change with theme <a href='https://mapcomplete.osm.be/{theme}'>{theme}</a>",
|
||||
"de": "Geändert mit Thema <a href='https://mapcomplete.osm.be/{theme}'>{theme}</a>",
|
||||
"nl": "Wijziging met thema <a href='https://mapcomplete.osm.be/{theme}'>{theme}</a>"
|
||||
"en": "Change with theme <a href='https://mapcomplete.osm.be/{theme}'>{theme}</a>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -102,32 +74,19 @@
|
|||
"key": "locale"
|
||||
},
|
||||
"question": {
|
||||
"en": "What locale (language) was this change made in?",
|
||||
"de": "In welchem Gebietsschema (Sprache) wurde diese Änderung vorgenommen?",
|
||||
"fr": "En quelle langue est-ce que ce changement a été fait ?",
|
||||
"nl": "In welke taal (en cultuur) werd deze wijziging gemaakt?"
|
||||
"en": "What locale (language) was this change made in?"
|
||||
},
|
||||
"render": {
|
||||
"en": "User locale is {locale}",
|
||||
"de": "Benutzergebietsschema ist {locale}",
|
||||
"fr": "La langue de l'utilisateur est {locale}",
|
||||
"nl": "De locale van de bijdrager is {locale}"
|
||||
"en": "User locale is {locale}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "host",
|
||||
"render": {
|
||||
"en": "Change with <a href='{host}'>{host}</a>",
|
||||
"ca": "Canvi amb <a href='{host}'>{host}</a>",
|
||||
"de": "Geändert über <a href='{host}'>{host}</a>",
|
||||
"fr": "Changement avec <a href='{host}'>{host}</a>",
|
||||
"nl": "Wijziging met <a href='{host}'>{host}</a>"
|
||||
"en": "Change with with <a href='{host}'>{host}</a>"
|
||||
},
|
||||
"question": {
|
||||
"en": "What host (website) was this change made with?",
|
||||
"de": "Über welchen Host (Webseite) wurde diese Änderung vorgenommen?",
|
||||
"fr": "Depuis quel serveur (site web) ce changement a-t-il été fait ?",
|
||||
"nl": "Op welk webadres werd deze wijziging gemaakt?"
|
||||
"en": "What host (website) was this change made with?"
|
||||
},
|
||||
"freeform": {
|
||||
"key": "host"
|
||||
|
@ -468,10 +427,7 @@
|
|||
}
|
||||
],
|
||||
"question": {
|
||||
"en": "Themename contains {search}",
|
||||
"de": "Themename enthält {search}",
|
||||
"fr": "Nom de thème contenant {search}",
|
||||
"nl": "Themanaam bevat {search}"
|
||||
"en": "Themename contains {search}"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -487,10 +443,7 @@
|
|||
}
|
||||
],
|
||||
"question": {
|
||||
"en": "Made by contributor {search}",
|
||||
"de": "Erstellt vom Mitwirkenden {search}",
|
||||
"fr": "Fait par le contributeur {search}",
|
||||
"nl": "Gemaakt door {search}"
|
||||
"en": "Made by contributor {search}"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -506,10 +459,7 @@
|
|||
}
|
||||
],
|
||||
"question": {
|
||||
"en": "<b>Not</b> made by contributor {search}",
|
||||
"de": "<b>Nicht</b> von Mitwirkendem {search}",
|
||||
"fr": "<b>Non</b> réalisé par le contributeur{search}",
|
||||
"nl": "<b>Niet</b> gemaakt door {search}"
|
||||
"en": "<b>Not</b> made by contributor {search}"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -526,10 +476,7 @@
|
|||
}
|
||||
],
|
||||
"question": {
|
||||
"en": "Made before {search}",
|
||||
"de": "Erstellt vor {search}",
|
||||
"fr": "Fait avant {search}",
|
||||
"nl": "Gemaakt voor {search}"
|
||||
"en": "Made before {search}"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -546,10 +493,7 @@
|
|||
}
|
||||
],
|
||||
"question": {
|
||||
"en": "Made after {search}",
|
||||
"de": "Erstellt nach {search}",
|
||||
"fr": "Fait après {search}",
|
||||
"nl": "Gemaakt na {search}"
|
||||
"en": "Made after {search}"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -565,10 +509,7 @@
|
|||
}
|
||||
],
|
||||
"question": {
|
||||
"en": "User language (iso-code) {search}",
|
||||
"de": "Benutzersprache (ISO-Code) {search}",
|
||||
"fr": "Langage utilisateur (code-iso) {search}",
|
||||
"nl": "Gebruikerstaal (iso-code) {search}"
|
||||
"en": "User language (iso-code) {search}"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -584,10 +525,7 @@
|
|||
}
|
||||
],
|
||||
"question": {
|
||||
"en": "Made with host {search}",
|
||||
"de": "Erstellt mit host {search}",
|
||||
"fr": "Fait par le serveur {search}",
|
||||
"nl": "Gemaakt met host {search}"
|
||||
"en": "Made with host {search}"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -613,9 +551,7 @@
|
|||
{
|
||||
"id": "link_to_more",
|
||||
"render": {
|
||||
"en": "More statistics can be found <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>here</a>",
|
||||
"de": "Weitere Statistiken <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>hier</a>",
|
||||
"nl": "Meer statistieken zijn <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>hier</a> te vinden"
|
||||
"en": "More statistics can be found <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>here</a>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -22,6 +22,20 @@ if [ $? -ne 0 ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
|
||||
SRC_MAPS=""
|
||||
BRANCH=`git rev-parse --abbrev-ref HEAD`
|
||||
echo "The branch name is $BRANCH"
|
||||
if [ $BRANCH = "develop" ]
|
||||
then
|
||||
SRC_MAPS="--sourcemap"
|
||||
echo "Source maps are enabled"
|
||||
fi
|
||||
|
||||
vite build $SRC_MAPS
|
||||
|
||||
|
||||
# Copy the layer files, as these might contain assets (e.g. svgs)
|
||||
cp -r assets/layers/ dist/assets/layers/
|
||||
cp -r assets/themes/ dist/assets/themes/
|
||||
|
@ -30,27 +44,3 @@ cp -r assets/templates/ dist/assets/templates/
|
|||
cp -r assets/tagRenderings/ dist/assets/tagRenderings/
|
||||
cp assets/*.png dist/assets/
|
||||
cp assets/*.svg dist/assets/
|
||||
|
||||
|
||||
echo -e "\n\n Building non-theme pages"
|
||||
echo -e " ==========================\n\n"
|
||||
vite build "index.html" "404.html" "professional.html" "automaton.html" "import_helper.html" "import_viewer.html" "land.html" "customGenerator.html" "theme.html" vendor
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR - stopping the build"
|
||||
exit 1
|
||||
fi
|
||||
echo -e "\n\n Building theme pages"
|
||||
echo -e " ======================\n\n"
|
||||
|
||||
for file in index_*.ts
|
||||
do
|
||||
theme=${file:6:-3}
|
||||
echo -e "\n\n $theme"
|
||||
echo -e " ------------ \n\n"
|
||||
# Builds the necessary files for just one theme, e.g. 'bookcases.html' + 'index_bookcases.ts' + supporting file
|
||||
vite build './' "$theme.html"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR - stopping the build"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -1,2 +1,17 @@
|
|||
/** @type {import('vite').UserConfig} */
|
||||
export default {}
|
||||
const { defineConfig } = require("vite")
|
||||
import fs from "fs"
|
||||
const allHtmlFiles = fs.readdirSync(".").filter((f) => f.endsWith(".html"))
|
||||
const input = {}
|
||||
|
||||
for (const html of allHtmlFiles) {
|
||||
const name = html.substring(0, html.length - 5)
|
||||
input[name] = "./" + html
|
||||
}
|
||||
|
||||
module.exports = defineConfig({
|
||||
build: {
|
||||
rollupOptions: {
|
||||
input,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue