From da024a4b92e69e4b19a9fd01eea34571eef4cbdc Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 29 Jun 2022 11:53:59 -0300 Subject: [PATCH] -fix sort countries --- packages/anastasis-core/src/anastasis-data.ts | 2 +- packages/anastasis-webui/clean_and_build.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/anastasis-core/src/anastasis-data.ts b/packages/anastasis-core/src/anastasis-data.ts index fbc11034f..f312cd5a5 100644 --- a/packages/anastasis-core/src/anastasis-data.ts +++ b/packages/anastasis-core/src/anastasis-data.ts @@ -217,7 +217,7 @@ export const anastasisData = { }, call_code: "+00", }, - ], + ].sort((a, b) => a.name > b.name ? 1 : (a.name < b.name ? -1 : 0)), }, countryDetails: { al: { diff --git a/packages/anastasis-webui/clean_and_build.sh b/packages/anastasis-webui/clean_and_build.sh index dd8d0d196..a88dc9c37 100755 --- a/packages/anastasis-webui/clean_and_build.sh +++ b/packages/anastasis-webui/clean_and_build.sh @@ -20,7 +20,7 @@ function build_js() { pnpm exec esbuild --log-level=error --define:process.env.__VERSION__=\"${VERSION}\" --define:process.env.__GIT_HASH__=\"${GIT_HASH}\" --bundle $1 --outdir=dist --target=es6 --loader:.svg=dataurl --format=iife --sourcemap --jsx-factory=h --jsx-fragment=Fragment --platform=browser --minify } -function bundle_html() { +function build_html() { cat html/$1.html \ | sed -e '/ANASTASIS_SCRIPT_CONTENT/ {' -e 'r dist/main.js' -e 'd' -e '}' \ | sed -e '/ANASTASIS_STYLE_CONTENT/ {' -e 'r dist/main.css' -e 'd' -e '}' \ @@ -49,8 +49,8 @@ wait -n pnpm run --silent test -- -R dot echo html -bundle_html ui -bundle_html ui-dev +build_html ui +build_html ui-dev if [ "WATCH" == "$1" ]; then @@ -61,7 +61,7 @@ if [ "WATCH" == "$1" ]; then inotifywait -e close_write -r src -q -m | while read line; do echo $(date) $line build_js src/main.ts - bundle ui-dev + build_html ui-dev ./watch/send.sh '{"type":"RELOAD"}' done; fi