1
0
Fork 0
mirror of https://github.com/Findus23/POI-Schiltern.git synced 2024-09-11 06:33:46 +02:00

major rewrite

This commit is contained in:
Lukas Winkler 2021-04-05 20:38:45 +02:00
parent d938247880
commit 53307bdaa0
Signed by: lukas
GPG key ID: 54DE4D798D244853
19 changed files with 454 additions and 5809 deletions

2
.gitignore vendored
View file

@ -13,3 +13,5 @@ data/
fetch/response.geo.json
src/apikey.js
fetch/poi.json
public
!public/index.html

View file

@ -1,4 +0,0 @@
{
"quotmark": false,
"esversion": 6
}

View file

@ -1,4 +0,0 @@
# autogenerated pyup.io config file
# see https://pyup.io/docs/configuration/ for all available options
schedule: every month

38
build.js Normal file
View file

@ -0,0 +1,38 @@
const esbuild = require('esbuild')
switch (process.argv[2]) {
case "build":
esbuild.build({
entryPoints: ["src/index.ts"],
target: "es2020",
bundle: true,
sourcemap: true,
minify: true,
color: true,
outdir: "public",
loader: {
".png": "file"
}
})
break
case "serve":
esbuild.serve({
port: 1234,
servedir: "public"
}, {
entryPoints: ['src/index.ts'],
bundle: true,
target: "es2020",
outdir: 'public',
sourcemap: true,
loader: {
".png": "file"
}
// minify:true
}).catch(() => process.exit(1))
break
default:
console.log(process.argv)
}

View file

@ -4,63 +4,29 @@ area:
lon: 15.628936886787415
keys:
amenity:
post_office:
category: Postamt
icon: postal
post_box:
category: Briefkasten
icon: postal
fuel:
category: Tankstelle
icon: fillingstation
atm:
category: Geldautomat
icon: atm-2
doctors:
category: Arzt
icon: medicine
pharmacy:
category: Apotheke
icon: firstaid
# restaurant:
# category: Restaurant
# icon: restaurant
taxi:
category: Taxi-Stand
icon: taxi
- cafe
- post_office
- post_box
- fuel
- atm
- doctors
- pharmacy
- taxi
cuisine:
heuriger:
category: Heuriger
icon: winetasting
regional:
category: Gasthaus
icon: restaurant
- heuriger
- regional
information:
office:
category: Touristeninformation
icon: information
- office
leisure:
playground:
category: Spielplatz
icon: playground
sea_bath:
category: Badeteich
icon: water
- playground
- sea_bath
shop:
bakery:
category: Bäckerei
icon: bread
supermarket:
category: Supermarkt
icon: supermarket
- bakery
- supermarket
tourism:
attraction:
category: Sehenswürdigkeit
icon: sight-2
museum:
category: Museum
icon: arch
- attraction
- museum
craft:
brewery:
category: Brauerei
icon: brewery1
- brewery
historic:
- castle

View file

@ -1,7 +1,6 @@
#!/usr/bin/env python3
import json
import os.path
import shutil
import overpass
import yaml
@ -24,23 +23,32 @@ if not os.path.isfile("response.geo.json") or True:
for key in keys:
values = keys[key]
for value in values:
keyValue = "'{key}'='{value}'".format(key=key, value=value)
request += "node[{keyValue}]{areastring};\nway[{keyValue}]{areastring};\n" \
.format(keyValue=keyValue, areastring=areastring)
icon = keys[key][value]["icon"]
shutil.copyfile("../icons/" + icon + ".png", "../data/images/" + icon + ".png")
keyValue = f"'{key}'='{value}'"
request += f"node[{keyValue}]{areastring};\n"
request += f"way[{keyValue}]{areastring};\n"
request += ");"
request += "out geom;"
print(request)
api = overpass.API()
data = api.Get(request, responseformat="geojson")
print("request finished")
with open('response.geo.json', 'w') as outfile:
json.dump(data, outfile, indent=4, sort_keys=True)
json.dump(data, outfile, indent=4, sort_keys=True, ensure_ascii=False)
else:
with open('response.geo.json') as inputfile:
data = json.load(inputfile)
filteredFeatures = []
for feature in data["features"]:
if "name" in feature["properties"] and "Telefonzelle" in feature["properties"]["name"]:
continue
if not feature["geometry"]["coordinates"]:
continue
filteredFeatures.append(feature)
data["features"] = filteredFeatures
for feature in data["features"]:
if feature["geometry"]["type"] == "LineString":
if len(feature["geometry"]["coordinates"]) == 2:
@ -58,18 +66,13 @@ for feature in data["features"]:
while searchValue not in keys[searchKeys[i]]:
i += 1
searchValue = feature["properties"][searchKeys[i]]
own = keys[searchKeys[i]][searchValue]
feature["properties"]["own"] = own
# own = keys[searchKeys[i]][searchValue]
feature["properties"]["key"] = searchKeys[i]
feature["properties"]["value"] = searchValue
filteredFeatures = []
for feature in data["features"]:
if not ("name" in feature["properties"] and "Telefonzelle" in feature["properties"]["name"]):
filteredFeatures.append(feature)
data["features"] = filteredFeatures
with open('additionalPois.json') as inputfile:
additional = json.load(inputfile)
data["features"] += additional["features"]
with open('../data/poi.json', 'w') as outfile:
json.dump(data, outfile, indent=4, sort_keys=True)
json.dump(data, outfile, indent=4, sort_keys=True, ensure_ascii=False)

172
fetch/poetry.lock generated
View file

@ -1,42 +1,42 @@
[[package]]
category = "main"
description = "Python package for providing Mozilla's CA Bundle."
name = "certifi"
version = "2020.12.5"
description = "Python package for providing Mozilla's CA Bundle."
category = "main"
optional = false
python-versions = "*"
version = "2020.6.20"
[[package]]
category = "main"
description = "Universal encoding detector for Python 2 and 3"
name = "chardet"
version = "4.0.0"
description = "Universal encoding detector for Python 2 and 3"
category = "main"
optional = false
python-versions = "*"
version = "3.0.4"
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
[[package]]
category = "main"
description = "Python bindings and utilities for GeoJSON"
name = "geojson"
version = "2.5.0"
description = "Python bindings and utilities for GeoJSON"
category = "main"
optional = false
python-versions = "*"
version = "2.5.0"
[[package]]
category = "main"
description = "Internationalized Domain Names in Applications (IDNA)"
name = "idna"
version = "2.10"
description = "Internationalized Domain Names in Applications (IDNA)"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
version = "2.10"
[[package]]
category = "main"
description = "Python wrapper for the OpenStreetMap Overpass API"
name = "overpass"
version = "0.7"
description = "Python wrapper for the OpenStreetMap Overpass API"
category = "main"
optional = false
python-versions = "*"
version = "0.7"
[package.dependencies]
geojson = ">=1.0.9"
@ -47,70 +47,70 @@ shapely = ">=1.6.4"
test = ["pytest"]
[[package]]
category = "main"
description = "YAML parser and emitter for Python"
name = "pyyaml"
version = "5.4.1"
description = "YAML parser and emitter for Python"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
version = "5.3.1"
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*"
[[package]]
category = "main"
description = "Python HTTP for Humans."
name = "requests"
version = "2.25.1"
description = "Python HTTP for Humans."
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
version = "2.24.0"
[package.dependencies]
certifi = ">=2017.4.17"
chardet = ">=3.0.2,<4"
chardet = ">=3.0.2,<5"
idna = ">=2.5,<3"
urllib3 = ">=1.21.1,<1.25.0 || >1.25.0,<1.25.1 || >1.25.1,<1.26"
urllib3 = ">=1.21.1,<1.27"
[package.extras]
security = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)"]
socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7)", "win-inet-pton"]
socks = ["PySocks (>=1.5.6,!=1.5.7)", "win-inet-pton"]
[[package]]
category = "main"
description = "Geometric objects, predicates, and operations"
name = "shapely"
version = "1.7.1"
description = "Geometric objects, predicates, and operations"
category = "main"
optional = false
python-versions = "*"
version = "1.7.0"
[package.extras]
all = ["pytest", "pytest-cov", "numpy"]
all = ["numpy", "pytest", "pytest-cov"]
test = ["pytest", "pytest-cov"]
vectorized = ["numpy"]
[[package]]
category = "main"
description = "HTTP library with thread-safe connection pooling, file post, and more."
name = "urllib3"
version = "1.26.4"
description = "HTTP library with thread-safe connection pooling, file post, and more."
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4"
version = "1.25.10"
[package.extras]
secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "ipaddress"]
socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"]
brotli = ["brotlipy (>=0.6.0)"]
secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "pyOpenSSL (>=0.14)", "ipaddress"]
socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7,<2.0)"]
[metadata]
content-hash = "4ed27c188f2c322258808218af6fd9d814716f64382c9106163bec3ecc8a6ccb"
lock-version = "1.0"
lock-version = "1.1"
python-versions = "^3.8"
content-hash = "4ed27c188f2c322258808218af6fd9d814716f64382c9106163bec3ecc8a6ccb"
[metadata.files]
certifi = [
{file = "certifi-2020.6.20-py2.py3-none-any.whl", hash = "sha256:8fc0819f1f30ba15bdb34cceffb9ef04d99f420f68eb75d901e9560b8749fc41"},
{file = "certifi-2020.6.20.tar.gz", hash = "sha256:5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3"},
{file = "certifi-2020.12.5-py2.py3-none-any.whl", hash = "sha256:719a74fb9e33b9bd44cc7f3a8d94bc35e4049deebe19ba7d8e108280cfd59830"},
{file = "certifi-2020.12.5.tar.gz", hash = "sha256:1a4995114262bffbc2413b159f2a1a480c969de6e6eb13ee966d470af86af59c"},
]
chardet = [
{file = "chardet-3.0.4-py2.py3-none-any.whl", hash = "sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"},
{file = "chardet-3.0.4.tar.gz", hash = "sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae"},
{file = "chardet-4.0.0-py2.py3-none-any.whl", hash = "sha256:f864054d66fd9118f2e67044ac8981a54775ec5b67aed0441892edb553d21da5"},
{file = "chardet-4.0.0.tar.gz", hash = "sha256:0d6f53a15db4120f2b08c94f11e7d93d2c911ee118b6b30a04ec3ee8310179fa"},
]
geojson = [
{file = "geojson-2.5.0-py2.py3-none-any.whl", hash = "sha256:ccbd13368dd728f4e4f13ffe6aaf725b6e802c692ba0dde628be475040c534ba"},
@ -125,44 +125,66 @@ overpass = [
{file = "overpass-0.7.tar.gz", hash = "sha256:267fac92d15caac15e15db6d9752341493065c94e7eae1187a8aea0d64005650"},
]
pyyaml = [
{file = "PyYAML-5.3.1-cp27-cp27m-win32.whl", hash = "sha256:74809a57b329d6cc0fdccee6318f44b9b8649961fa73144a98735b0aaf029f1f"},
{file = "PyYAML-5.3.1-cp27-cp27m-win_amd64.whl", hash = "sha256:240097ff019d7c70a4922b6869d8a86407758333f02203e0fc6ff79c5dcede76"},
{file = "PyYAML-5.3.1-cp35-cp35m-win32.whl", hash = "sha256:4f4b913ca1a7319b33cfb1369e91e50354d6f07a135f3b901aca02aa95940bd2"},
{file = "PyYAML-5.3.1-cp35-cp35m-win_amd64.whl", hash = "sha256:cc8955cfbfc7a115fa81d85284ee61147059a753344bc51098f3ccd69b0d7e0c"},
{file = "PyYAML-5.3.1-cp36-cp36m-win32.whl", hash = "sha256:7739fc0fa8205b3ee8808aea45e968bc90082c10aef6ea95e855e10abf4a37b2"},
{file = "PyYAML-5.3.1-cp36-cp36m-win_amd64.whl", hash = "sha256:69f00dca373f240f842b2931fb2c7e14ddbacd1397d57157a9b005a6a9942648"},
{file = "PyYAML-5.3.1-cp37-cp37m-win32.whl", hash = "sha256:d13155f591e6fcc1ec3b30685d50bf0711574e2c0dfffd7644babf8b5102ca1a"},
{file = "PyYAML-5.3.1-cp37-cp37m-win_amd64.whl", hash = "sha256:73f099454b799e05e5ab51423c7bcf361c58d3206fa7b0d555426b1f4d9a3eaf"},
{file = "PyYAML-5.3.1-cp38-cp38-win32.whl", hash = "sha256:06a0d7ba600ce0b2d2fe2e78453a470b5a6e000a985dd4a4e54e436cc36b0e97"},
{file = "PyYAML-5.3.1-cp38-cp38-win_amd64.whl", hash = "sha256:95f71d2af0ff4227885f7a6605c37fd53d3a106fcab511b8860ecca9fcf400ee"},
{file = "PyYAML-5.3.1.tar.gz", hash = "sha256:b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d"},
{file = "PyYAML-5.4.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:3b2b1824fe7112845700f815ff6a489360226a5609b96ec2190a45e62a9fc922"},
{file = "PyYAML-5.4.1-cp27-cp27m-win32.whl", hash = "sha256:129def1b7c1bf22faffd67b8f3724645203b79d8f4cc81f674654d9902cb4393"},
{file = "PyYAML-5.4.1-cp27-cp27m-win_amd64.whl", hash = "sha256:4465124ef1b18d9ace298060f4eccc64b0850899ac4ac53294547536533800c8"},
{file = "PyYAML-5.4.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:bb4191dfc9306777bc594117aee052446b3fa88737cd13b7188d0e7aa8162185"},
{file = "PyYAML-5.4.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:6c78645d400265a062508ae399b60b8c167bf003db364ecb26dcab2bda048253"},
{file = "PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:4e0583d24c881e14342eaf4ec5fbc97f934b999a6828693a99157fde912540cc"},
{file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:72a01f726a9c7851ca9bfad6fd09ca4e090a023c00945ea05ba1638c09dc3347"},
{file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_s390x.whl", hash = "sha256:895f61ef02e8fed38159bb70f7e100e00f471eae2bc838cd0f4ebb21e28f8541"},
{file = "PyYAML-5.4.1-cp36-cp36m-win32.whl", hash = "sha256:3bd0e463264cf257d1ffd2e40223b197271046d09dadf73a0fe82b9c1fc385a5"},
{file = "PyYAML-5.4.1-cp36-cp36m-win_amd64.whl", hash = "sha256:e4fac90784481d221a8e4b1162afa7c47ed953be40d31ab4629ae917510051df"},
{file = "PyYAML-5.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5accb17103e43963b80e6f837831f38d314a0495500067cb25afab2e8d7a4018"},
{file = "PyYAML-5.4.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:e1d4970ea66be07ae37a3c2e48b5ec63f7ba6804bdddfdbd3cfd954d25a82e63"},
{file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:cb333c16912324fd5f769fff6bc5de372e9e7a202247b48870bc251ed40239aa"},
{file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_s390x.whl", hash = "sha256:fe69978f3f768926cfa37b867e3843918e012cf83f680806599ddce33c2c68b0"},
{file = "PyYAML-5.4.1-cp37-cp37m-win32.whl", hash = "sha256:dd5de0646207f053eb0d6c74ae45ba98c3395a571a2891858e87df7c9b9bd51b"},
{file = "PyYAML-5.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:08682f6b72c722394747bddaf0aa62277e02557c0fd1c42cb853016a38f8dedf"},
{file = "PyYAML-5.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d2d9808ea7b4af864f35ea216be506ecec180628aced0704e34aca0b040ffe46"},
{file = "PyYAML-5.4.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8c1be557ee92a20f184922c7b6424e8ab6691788e6d86137c5d93c1a6ec1b8fb"},
{file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:fd7f6999a8070df521b6384004ef42833b9bd62cfee11a09bda1079b4b704247"},
{file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_s390x.whl", hash = "sha256:bfb51918d4ff3d77c1c856a9699f8492c612cde32fd3bcd344af9be34999bfdc"},
{file = "PyYAML-5.4.1-cp38-cp38-win32.whl", hash = "sha256:fa5ae20527d8e831e8230cbffd9f8fe952815b2b7dae6ffec25318803a7528fc"},
{file = "PyYAML-5.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:0f5f5786c0e09baddcd8b4b45f20a7b5d61a7e7e99846e3c799b05c7c53fa696"},
{file = "PyYAML-5.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:294db365efa064d00b8d1ef65d8ea2c3426ac366c0c4368d930bf1c5fb497f77"},
{file = "PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:74c1485f7707cf707a7aef42ef6322b8f97921bd89be2ab6317fd782c2d53183"},
{file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:d483ad4e639292c90170eb6f7783ad19490e7a8defb3e46f97dfe4bacae89122"},
{file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_s390x.whl", hash = "sha256:fdc842473cd33f45ff6bce46aea678a54e3d21f1b61a7750ce3c498eedfe25d6"},
{file = "PyYAML-5.4.1-cp39-cp39-win32.whl", hash = "sha256:49d4cdd9065b9b6e206d0595fee27a96b5dd22618e7520c33204a4a3239d5b10"},
{file = "PyYAML-5.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:c20cfa2d49991c8b4147af39859b167664f2ad4561704ee74c1de03318e898db"},
{file = "PyYAML-5.4.1.tar.gz", hash = "sha256:607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e"},
]
requests = [
{file = "requests-2.24.0-py2.py3-none-any.whl", hash = "sha256:fe75cc94a9443b9246fc7049224f75604b113c36acb93f87b80ed42c44cbb898"},
{file = "requests-2.24.0.tar.gz", hash = "sha256:b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b"},
{file = "requests-2.25.1-py2.py3-none-any.whl", hash = "sha256:c210084e36a42ae6b9219e00e48287def368a26d03a048ddad7bfee44f75871e"},
{file = "requests-2.25.1.tar.gz", hash = "sha256:27973dd4a904a4f13b263a19c866c13b92a39ed1c964655f025f3f8d3d75b804"},
]
shapely = [
{file = "Shapely-1.7.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:11090bd5b5f11d54e1924a11198226971dab6f392c2e5a3c74514857f764b971"},
{file = "Shapely-1.7.0-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:7554b1acd64a34d78189ab2f691bac967e0d9b38a4f345044552f9dcf3f92149"},
{file = "Shapely-1.7.0-cp35-cp35m-macosx_10_6_intel.whl", hash = "sha256:a6c07b3b87455d107b0e4097889e9aba80a0812abf32a322a133af819b85d68a"},
{file = "Shapely-1.7.0-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:b845a97f8366cc4aca197c3b04304cc301d9250518123155732da6a0e0575b49"},
{file = "Shapely-1.7.0-cp35-cp35m-win32.whl", hash = "sha256:50f96eb9993b6d841aac0addb84ea5f9da81c3fa97e1ec67c11964c8bb4fa0a5"},
{file = "Shapely-1.7.0-cp35-cp35m-win_amd64.whl", hash = "sha256:640e8a82b5f69ccd14e7520dd66d1247cf362096586e663ef9b8098cc0cb272b"},
{file = "Shapely-1.7.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:7e9b01e89712fd988f931721fa36298e06a02eedf87fe7a7fd704d08f74c00f1"},
{file = "Shapely-1.7.0-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:1af407c58e7898a511ad01dc6e7c2099493071d939340553686b27513db6478e"},
{file = "Shapely-1.7.0-cp36-cp36m-win32.whl", hash = "sha256:2a2d37105c1d6d936f829de6c1c4ec8d43484d7b8bae8493bdd4267140dce650"},
{file = "Shapely-1.7.0-cp36-cp36m-win_amd64.whl", hash = "sha256:4acbd566544c33bbc58c7dd264638ff3b91a57d9b162693c37520ea60d13668d"},
{file = "Shapely-1.7.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:ae9a2da2b30c0b42029337854f78c71c28d285d254efd5f3be3700d997bfd18e"},
{file = "Shapely-1.7.0-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:29be7767a32df19e2186288cee63e539b386a35139524dc22eeceb244d0b092b"},
{file = "Shapely-1.7.0-cp37-cp37m-win32.whl", hash = "sha256:9c62a9f7adceaa3110f2ec359c70dddd1640191609e91029e4d307e63fc8a5af"},
{file = "Shapely-1.7.0-cp37-cp37m-win_amd64.whl", hash = "sha256:234c5424d61d8b263d6d20045f5f32437819627ca57c1ea0c08368013b49824b"},
{file = "Shapely-1.7.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cc0fb1851b59473d2fa2f257f1e35740875af3f402c4575b4115028234e6f2eb"},
{file = "Shapely-1.7.0-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:2154b9f25c5f13785cb05ce80b2c86e542bc69671193743f29c9f4c791c35db3"},
{file = "Shapely-1.7.0-cp38-cp38-win32.whl", hash = "sha256:f7eb83fb36755edcbeb76fb367104efdf980307536c38ef610cb2e1a321defe0"},
{file = "Shapely-1.7.0-cp38-cp38-win_amd64.whl", hash = "sha256:3793b09cbd86fe297193b365cbaf58b2f7d1ddeb273213185b2ddbab360e54ae"},
{file = "Shapely-1.7.0.tar.gz", hash = "sha256:e21a9fe1a416463ff11ae037766fe410526c95700b9e545372475d2361cc951e"},
{file = "Shapely-1.7.1-1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:46da0ea527da9cf9503e66c18bab6981c5556859e518fe71578b47126e54ca93"},
{file = "Shapely-1.7.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:4c10f317e379cc404f8fc510cd9982d5d3e7ba13a9cfd39aa251d894c6366798"},
{file = "Shapely-1.7.1-cp35-cp35m-macosx_10_6_intel.whl", hash = "sha256:17df66e87d0fe0193910aeaa938c99f0b04f67b430edb8adae01e7be557b141b"},
{file = "Shapely-1.7.1-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:da38ed3d65b8091447dc3717e5218cc336d20303b77b0634b261bc5c1aa2bae8"},
{file = "Shapely-1.7.1-cp35-cp35m-win32.whl", hash = "sha256:8e7659dd994792a0aad8fb80439f59055a21163e236faf2f9823beb63a380e19"},
{file = "Shapely-1.7.1-cp35-cp35m-win_amd64.whl", hash = "sha256:791477edb422692e7dc351c5ed6530eb0e949a31b45569946619a0d9cd5f53cb"},
{file = "Shapely-1.7.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:e3afccf0437edc108eef1e2bb9cc4c7073e7705924eb4cd0bf7715cd1ef0ce1b"},
{file = "Shapely-1.7.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:8f15b6ce67dcc05b61f19c689b60f3fe58550ba994290ff8332f711f5aaa9840"},
{file = "Shapely-1.7.1-cp36-cp36m-win32.whl", hash = "sha256:60e5b2282619249dbe8dc5266d781cc7d7fb1b27fa49f8241f2167672ad26719"},
{file = "Shapely-1.7.1-cp36-cp36m-win_amd64.whl", hash = "sha256:de618e67b64a51a0768d26a9963ecd7d338a2cf6e9e7582d2385f88ad005b3d1"},
{file = "Shapely-1.7.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:182716ffb500d114b5d1b75d7fd9d14b7d3414cef3c38c0490534cc9ce20981a"},
{file = "Shapely-1.7.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:4f3c59f6dbf86a9fc293546de492f5e07344e045f9333f3a753f2dda903c45d1"},
{file = "Shapely-1.7.1-cp37-cp37m-win32.whl", hash = "sha256:6871acba8fbe744efa4f9f34e726d070bfbf9bffb356a8f6d64557846324232b"},
{file = "Shapely-1.7.1-cp37-cp37m-win_amd64.whl", hash = "sha256:35be1c5d869966569d3dfd4ec31832d7c780e9df760e1fe52131105685941891"},
{file = "Shapely-1.7.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:052eb5b9ba756808a7825e8a8020fb146ec489dd5c919e7d139014775411e688"},
{file = "Shapely-1.7.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:90a3e2ae0d6d7d50ff2370ba168fbd416a53e7d8448410758c5d6a5920646c1d"},
{file = "Shapely-1.7.1-cp38-cp38-win32.whl", hash = "sha256:a3774516c8a83abfd1ddffb8b6ec1b0935d7fe6ea0ff5c31a18bfdae567b4eba"},
{file = "Shapely-1.7.1-cp38-cp38-win_amd64.whl", hash = "sha256:6593026cd3f5daaea12bcc51ae5c979318070fefee210e7990cb8ac2364e79a1"},
{file = "Shapely-1.7.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:617bf046a6861d7c6b44d2d9cb9e2311548638e684c2cd071d8945f24a926263"},
{file = "Shapely-1.7.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:b40cc7bb089ae4aa9ddba1db900b4cd1bce3925d2a4b5837b639e49de054784f"},
{file = "Shapely-1.7.1-cp39-cp39-win32.whl", hash = "sha256:2df5260d0f2983309776cb41bfa85c464ec07018d88c0ecfca23d40bfadae2f1"},
{file = "Shapely-1.7.1-cp39-cp39-win_amd64.whl", hash = "sha256:a5c3a50d823c192f32615a2a6920e8c046b09e07a58eba220407335a9cd2e8ea"},
{file = "Shapely-1.7.1.tar.gz", hash = "sha256:1641724c1055459a7e2b8bbe47ba25bdc89554582e62aec23cb3f3ca25f9b129"},
]
urllib3 = [
{file = "urllib3-1.25.10-py2.py3-none-any.whl", hash = "sha256:e7983572181f5e1522d9c98453462384ee92a0be7fac5f1413a1e35c56cc0461"},
{file = "urllib3-1.25.10.tar.gz", hash = "sha256:91056c15fa70756691db97756772bb1eb9678fa585d9184f24534b100dc60f4a"},
{file = "urllib3-1.26.4-py2.py3-none-any.whl", hash = "sha256:2f4da4594db7e1e110a944bb1b551fdf4e6c136ad42e4234131391e21eb5b0df"},
{file = "urllib3-1.26.4.tar.gz", hash = "sha256:e7b021f7241115872f92f43c6508082facffbd1c048e3c6e2bb9c2a157e28937"},
]

View file

@ -1,31 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Umgebungskarte Schiltern</title>
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['disableCookies']);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
_paq.push(['enableHeartBeatTimer']);
(function() {
var u="https://piwik.ferienhaus-schiltern.at/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', '12']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Piwik Code -->
</head>
<body>
<div id="map"></div>
<% if (htmlWebpackPlugin.options.devServer) { %>
<script src="<%= htmlWebpackPlugin.options.devServer %>/webpack-dev-server.js" type="text/javascript"></script>
<% } %>
</body>
</html>

View file

@ -12,26 +12,11 @@
"opening_hours": "^3.5.0"
},
"devDependencies": {
"@babel/core": "^7.0.0-beta.38",
"@babel/polyfill": "^7.0.0-beta.38",
"@babel/preset-env": "^7.0.0-beta.38",
"babel-loader": "^8.0.0-beta.0",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"clean-webpack-plugin": "^1.0.0",
"cross-env": "^5.1.3",
"css-loader": "^2.0.0",
"extract-text-webpack-plugin": "^3.0.2",
"file-loader": "^2.0.0",
"html-webpack-plugin": "^3.2.0",
"jshint": "^2.9.5",
"license-webpack-plugin": "^2.0.4",
"mini-css-extract-plugin": "^0.5.0",
"style-loader": "^0.23.1",
"url-loader": "^1.0.1",
"webpack": "^4.16.3",
"webpack-cli": "^3.1.0",
"webpack-dev-server": "^3.1.5",
"webpack-subresource-integrity": "^1.1.0-rc.4"
"@types/leaflet": "^1.7.0",
"@types/luxon": "^1.26.3",
"esbuild": "^0.11.5",
"luxon": "^1.26.0",
"typescript": "^4.2.3"
},
"scripts": {
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules",

View file

@ -1,2 +1,2 @@
#!/bin/bash
rsync -rvzP ./dist/ lukas@lw1.at:/var/www/karte/ --fuzzy --delete-after -v
rsync -rvzP ./public/ lukas@lw1.at:/var/www/karte/ --fuzzy --delete-after -v

0
src/icons.ts Normal file
View file

View file

@ -1,86 +0,0 @@
import "leaflet/dist/leaflet.css";
import "./style.css";
import poi from "../data/poi.json";
import L from "leaflet";
import apiKey from "./apikey"; //optional
import getPopupText from "./popup";
document.addEventListener('DOMContentLoaded', function() {
let map = L.map('map').setView([48.51579416571888, 15.6255304813385], 13);
let layer = L.tileLayer('https://maps.lw1.at/tiles/1.0.0/osm/GLOBAL_MERCATOR/{z}/{x}/{y}.png', {
maxZoom: 19,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'
}).addTo(map);
let Thunderforest_OpenCycleMap = L.tileLayer('https://{s}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png?apikey={apikey}', {
attribution: '&copy; <a href="https://www.thunderforest.com/">Thunderforest</a>, &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>',
apikey: apiKey,
maxZoom: 22
});
let Thunderforest_Outdoors = L.tileLayer('https://{s}.tile.thunderforest.com/outdoors/{z}/{x}/{y}.png?apikey={apikey}', {
attribution: '&copy; <a href="https://www.thunderforest.com/">Thunderforest</a>, &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>',
apikey: apiKey,
maxZoom: 22
});
let blankLayer = L.tileLayer('');
let LeafIcon = L.Icon.extend({
options: {
iconAnchor: [16, 35],
popupAnchor: [0, -35]
}
});
let categories = {},
category;
let geojsonLayer = L.geoJson(null, {
pointToLayer: function(feature, latlng) {
let iconfile = require("../data/images/" + feature.properties.own.icon + '.png');
return L.marker(latlng, {icon: new LeafIcon({iconUrl: iconfile})});
},
onEachFeature: function(feature, layer) {
let popuptext = getPopupText(feature);
layer.bindPopup(popuptext);
category = feature.properties.own.category;
// Initialize the category array if not already set.
if (typeof categories[category] === "undefined") {
categories[category] = [];
}
categories[category].push(layer);
}
});
let mapLayers = {
// "Leer": blankLayer,
'Standard': layer,
"Wanderkarte": Thunderforest_Outdoors,
"Fahrradkarte": Thunderforest_OpenCycleMap
};
let attribution = function() {
return 'Icons von <a href="https://mapicons.mapsmarker.com">mapicons.mapsmarker.com</a> ' +
'(<a href="http://creativecommons.org/licenses/by-sa/3.0/">CC BY SA 3.0</a>)' + " | " +
'<a href="main.licenses.txt" target="_blank">Lizenzen</a> + ' +
'<a href="https://github.com/Findus23/POI-Schiltern" target="_blank">Source</a>' +
' | <a href="https://www.ferienhaus-schiltern.at/impressum/" target="_blank">Impressum und Datenschutz</a>';
};
let overlays = {};
let categoryName, categoryArray, categoryLG;
geojsonLayer.addData(poi);
map.fitBounds(geojsonLayer.getBounds());
for (categoryName in categories) {
categoryArray = categories[categoryName];
categoryLG = L.layerGroup(categoryArray);
categoryLG.categoryName = categoryName;
categoryLG.getAttribution = attribution;
overlays[categoryName] = categoryLG;
categoryLG.addTo(map);
}
let control = L.control.layers(mapLayers, overlays).addTo(map);
// L.control.locate().addTo(map);
}, false);

105
src/index.ts Normal file
View file

@ -0,0 +1,105 @@
import "leaflet/dist/leaflet.css";
import "./style.css";
import poi from "../data/poi.json";
import L, {LatLng, Layer, TileLayerOptions} from "leaflet";
import {GeoJsonObject} from "geojson";
import {getPopupText} from "./popup";
import {nameToIcon, toName} from "./utils";
document.addEventListener('DOMContentLoaded', function () {
let map = L.map('map').setView([48.51579416571888, 15.6255304813385], 13);
const OpenStreetMapMapnik = L.tileLayer('https://maps.lw1.at/tiles/1.0.0/osm/GLOBAL_MERCATOR/{z}/{x}/{y}.png', {
maxZoom: 19,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'
}).addTo(map);
const BasemapATbasemap = L.tileLayer("https://maps.lw1.at/tiles/1.0.0/basemap/GLOBAL_MERCATOR/{z}/{x}/{y}.{format}", {
maxZoom: 19,
attribution: 'Datenquelle: <a href="https://www.basemap.at">basemap.at</a>',
subdomains: ["", "1", "2", "3", "4"],
format: "png",
bounds: [[46.35877, 8.782379], [49.037872, 17.189532]]
} as TileLayerOptions);
// https://{s}.piano.tiles.quaidorsay.fr/fr/{z}/{x}/{y}.png
const Piano = L.tileLayer('https://maps.lw1.at/tiles/1.0.0/piano/GLOBAL_MERCATOR/{z}/{x}/{y}.png', {
attribution: 'Tiles <a href="https://github.com/tilery/pianoforte">PianoFr</a> | &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors',
minZoom: 0,
maxZoom: 20,
});
//https://{s}.forte.tiles.quaidorsay.fr/fr/{z}/{x}/{y}.png
const Forte = L.tileLayer('https://maps.lw1.at/tiles/1.0.0/forte/GLOBAL_MERCATOR/{z}/{x}/{y}.png', {
attribution: 'Tiles <a href="https://github.com/tilery/pianoforte">PianoFr</a> | &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors',
minZoom: 0,
maxZoom: 20,
});
// https://{s}.tile-cyclosm.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png
const CyclOSM = L.tileLayer('https://maps.lw1.at/tiles/1.0.0/cyclOSM/GLOBAL_MERCATOR/{z}/{x}/{y}.png', {
maxZoom: 20,
attribution: '<a href="https://github.com/cyclosm/cyclosm-cartocss-style/releases" title="CyclOSM - Open Bicycle render">CyclOSM</a> | Map data: &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
});
let LeafIcon = L.Icon.extend({
options: {
iconAnchor: [16, 35],
popupAnchor: [0, -35],
}
});
let categories: { [name: string]: Layer[] } = {};
let geojsonLayer = new L.GeoJSON(<unknown>[] as GeoJsonObject, {
pointToLayer: function (feature: GeoJSON.Feature, latlng: LatLng) {
const category = feature.properties.key + "=" + feature.properties.value;
let iconfile = nameToIcon(category);
return L.marker(latlng, {icon: new LeafIcon({iconUrl: iconfile})});
},
onEachFeature: function (feature, layer) {
let popuptext = getPopupText(feature);
layer.bindPopup(popuptext);
const category = toName(feature.properties.key, feature.properties.value)
// Initialize the category array if not already set.
if (typeof categories[category] === "undefined") {
categories[category] = [];
}
categories[category].push(layer);
}
});
let mapLayers = {
// "Leer": blankLayer,
'Standard': OpenStreetMapMapnik,
"Geländekarte": CyclOSM,
// "Hell": Forte,
// "Einfach": Piano,
"Basemap.at": BasemapATbasemap,
};
let attribution = function () {
return 'Icons von <a href="https://mapicons.mapsmarker.com">mapicons.mapsmarker.com</a> ' +
'(<a href="http://creativecommons.org/licenses/by-sa/3.0/">CC BY SA 3.0</a>)' + " | " +
'<a href="main.licenses.txt" target="_blank">Lizenzen</a> + ' +
'<a href="https://github.com/Findus23/POI-Schiltern" target="_blank">Source</a>' +
' | <a href="https://www.ferienhaus-schiltern.at/impressum/" target="_blank">Impressum und Datenschutz</a>';
};
let overlays = {};
let categoryName, categoryArray, categoryLG;
geojsonLayer.addData(poi);
map.fitBounds(geojsonLayer.getBounds());
for (categoryName in categories) {
categoryArray = categories[categoryName];
categoryLG = L.layerGroup(categoryArray);
categoryLG.categoryName = categoryName;
categoryLG.getAttribution = attribution;
overlays[categoryName] = categoryLG;
categoryLG.addTo(map);
}
let control = L.control.layers(mapLayers, overlays).addTo(map);
// L.control.locate().addTo(map);
}, false);

4
src/png.d.ts vendored Normal file
View file

@ -0,0 +1,4 @@
declare module "*.png" {
const value: any;
export = value;
}

View file

@ -1,15 +1,15 @@
// @ts-ignore
import opening_hours from "opening_hours";
import moment from "moment";
import {toName} from "./utils";
import { DateTime } from 'luxon';
function getPopupText(feature) {
moment.locale(window.navigator.userLanguage || window.navigator.language);
export function getPopupText(feature: GeoJSON.Feature) {
let popuptext = [];
let prop = feature.properties;
if (prop.name) {
popuptext.push(prop.name);
} else {
popuptext.push(prop.own.category);
popuptext.push(toName(prop.key, prop.value));
}
if (prop.website) {
popuptext.push("<a href='" + prop.website + "' target='_blank' rel='noopener'>" + prop.website + "</a>");
@ -32,14 +32,14 @@ function getPopupText(feature) {
});
if (!oh.getUnknown()) {
let openText;
let change = moment(oh.getNextChange());
let change = DateTime.fromJSDate(oh.getNextChange());
if (oh.getState()) {
openText = "hat geöffnet<br>schließt ";
} else {
openText = "hat geschlossen<br>öffnet ";
}
if (oh.getNextChange()) {
openText += change.calendar() + " (" + change.fromNow() + ")";
openText += change.toRelativeCalendar() + " (" + change.toRelative() + ")";
} else {
openText += "nie"
}
@ -49,4 +49,3 @@ function getPopupText(feature) {
return popuptext.join("<br>");
}
export default getPopupText;

110
src/utils.ts Normal file
View file

@ -0,0 +1,110 @@
import arch from "../icons/arch.png"
import atm2 from "../icons/atm-2.png"
import bread from "../icons/bread.png"
import brewery1 from "../icons/brewery1.png"
import fillingstation from "../icons/fillingstation.png"
import postal from "../icons/postal.png"
import firstaid from "../icons/firstaid.png"
import taxi from "../icons/taxi.png"
import medicine from "../icons/medicine.png"
import winetasting from "../icons/winetasting.png"
import restaurant from "../icons/restaurant.png"
import information from "../icons/information.png"
import water from "../icons/water.png"
import playground from "../icons/playground.png"
import supermarket from "../icons/supermarket.png"
import sight2 from "../icons/sight-2.png"
import castle2 from "../icons/castle-2.png"
import coffee from "../icons/coffee.png"
export function nameToIcon(name: string): string {
switch (name) {
case "amenity=cafe":
return coffee
case "amenity=post_office":
return postal
case "amenity=post_box":
return postal
case "amenity=fuel":
return fillingstation
case "amenity=atm":
return atm2
case "amenity=doctors":
return medicine
case "amenity=pharmacy":
return firstaid
case "amenity=taxi":
return taxi
case "cuisine=heuriger":
return winetasting
case "information=office":
return information
case "cuisine=regional":
return restaurant
case "leisure=playground":
return playground
case "leisure=sea_bath":
return water
case "shop=bakery":
return bread
case "shop=supermarket":
return supermarket
case "tourism=attraction":
return sight2
case "tourism=museum":
return arch
case "craft=brewery":
return brewery1
case "historic=castle":
return castle2
default:
return information
}
}
export function toName(key: string, value: string): string {
const kv = key + "=" + value
switch (kv) {
case "amenity=cafe":
return "Cafe"
case "amenity=post_office":
return "Postamt"
case "amenity=post_box":
return "Briefkasten"
case "amenity=fuel":
return "Tankstelle"
case "amenity=atm":
return "Geldautomat"
case "amenity=doctors":
return "Arzt"
case "amenity=pharmacy":
return "Apotheke"
case "amenity=taxi":
return "Taxi-Stand"
case "cuisine=heuriger":
return "Heuriger"
case "information=office":
return "Touristeninformation"
case "cuisine=regional":
return "Gasthaus"
case "leisure=playground":
return "Spielplatz"
case "leisure=sea_bath":
return "Badeteich"
case "shop=bakery":
return "Bäckerei"
case "shop=supermarket":
return "Supermarkt"
case "tourism=attraction":
return "Sehenswürdigkeit"
case "tourism=museum":
return "Museum"
case "craft=brewery":
return "Brauerei"
case "historic=castle":
return "Schloss"
default:
return "Unbekannt"
}
}

14
tsconfig.json Normal file
View file

@ -0,0 +1,14 @@
{
"compilerOptions": {
"lib": [
"es2017",
"dom"
],
"noImplicitAny": true,
"noEmit": true,
"watch": true,
"isolatedModules": true,
"esModuleInterop": true,
"resolveJsonModule": true
}
}

View file

@ -1,120 +0,0 @@
const path = require('path');
let webpack = require('webpack');
let HtmlWebpackPlugin = require('html-webpack-plugin');
let LicenseWebpackPlugin = require('license-webpack-plugin').LicenseWebpackPlugin;
let SriPlugin = require('webpack-subresource-integrity');
let CleanWebpackPlugin = require('clean-webpack-plugin');
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
module.exports = {
entry: './src/index.js',
output: {
filename: 'build-[hash].js',
path: path.resolve(__dirname, 'dist'),
crossOriginLoading: "anonymous"
},
devtool: 'source-map',
devServer: {
historyApiFallback: true,
noInfo: true,
overlay: true
},
mode: process.env.NODE_ENV,
plugins: [
new webpack.NamedModulesPlugin(),
new HtmlWebpackPlugin({
title: 'Umgebungsplan Schiltern',
template: 'index.ejs',
devServer: process.env.NODE_ENV === 'production' ? '' : 'http://localhost:8081',
}),
new webpack.IgnorePlugin(/^jquery/),
new LicenseWebpackPlugin({
pattern: /^(MIT|ISC|BSD.*)$/,
unacceptablePattern: /GPL/,
abortOnUnacceptableLicense: true,
perChunkOutput: false
}),
new SriPlugin({
hashFuncNames: ['sha256'],
enabled: process.env.NODE_ENV === 'production',
}),
],
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: [
[
"@babel/preset-env",
{
"targets": {
"browsers": [
">1% in AT"
]
}
}
],
],
"plugins": ["syntax-dynamic-import"]
}
}
},
{
test: /\.css$/,
use: (process.env.NODE_ENV === 'production' ? [
{
loader: MiniCssExtractPlugin.loader,
},
"css-loader"
] : [
{loader: "style-loader"},
{loader: "css-loader"}
])
},
{
test: /\.(png|svg|jpg|gif)$/,
use: [
'url-loader'
]
}
]
}
};
if (process.env.NODE_ENV === 'production') {
module.exports.optimization = {
splitChunks: {
name: "commons"
},
minimize: true
};
module.exports.devtool = '#source-map';
// http://vue-loader.vuejs.org/en/workflow/production.html
module.exports.plugins = (module.exports.plugins || []).concat([
new CleanWebpackPlugin("dist"),
new webpack.HashedModuleIdsPlugin({
hashFunction: 'sha256',
hashDigest: 'hex',
hashDigestLength: 20
}),
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
}),
new webpack.LoaderOptionsPlugin({
minimize: true
}),
new MiniCssExtractPlugin({
// Options similar to the same options in webpackOptions.output
// both options are optional
filename: "[name].css",
chunkFilename: "[id].css"
})
])
}

5422
yarn.lock

File diff suppressed because it is too large Load diff