This commit is contained in:
Bence Pőcze 2020-06-01 20:42:37 +02:00
parent f7d37b8513
commit a82b27cb90
6 changed files with 21 additions and 3 deletions

View File

@ -5,3 +5,4 @@ DB_PASSWORD=mapguesser
DB_NAME=mapguesser
GOOGLE_MAPS_SERVER_API_KEY=your_google_maps_server_api_key
GOOGLE_MAPS_JS_API_KEY=your_google_maps_js_api_key
LEAFLET_TILESERVER_URL=a_leaflet_compatible_tileserver_url

1
public/static/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
node_modules

View File

@ -0,0 +1,5 @@
{
"dependencies": {
"leaflet": "^1.6.0"
}
}

8
public/static/yarn.lock Normal file
View File

@ -0,0 +1,8 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
leaflet@^1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/leaflet/-/leaflet-1.6.0.tgz#aecbb044b949ec29469eeb31c77a88e2f448f308"
integrity sha512-CPkhyqWUKZKFJ6K8umN5/D2wrJ2+/8UIpXppY7QDnUZW5bZL5+SEI2J7GBpwh4LIupOKqbNSQXgqmrEJopHVNQ==

View File

@ -9,13 +9,14 @@ if [ -f ${ROOT_DIR}/installed ]; then
exit 1
fi
echo "Installing MapGuesser DB..."
echo "Installing Yarn packages..."
(cd ${ROOT_DIR}/public/static && yarn install)
echo "Installing MapGuesser DB..."
mysql --host=${DB_HOST} --user=${DB_USER} --password=${DB_PASSWORD} ${DB_NAME} < ${ROOT_DIR}/db/mapguesser.sql
if [ -z "${DEV}" ] || [ "${DEV}" -eq "0" ]; then
echo "Minifying JS, CSS and SVG files..."
${ROOT_DIR}/scripts/minify.sh
fi

View File

@ -7,8 +7,10 @@ ROOT_DIR=$(dirname $(readlink -f "$0"))/..
echo "Installing Composer packages..."
(cd ${ROOT_DIR} && composer install)
echo "Installing Yarn packages..."
(cd ${ROOT_DIR}/public/static && yarn install)
if [ -z "${DEV}" ] || [ "${DEV}" -eq "0" ]; then
echo "Minifying JS, CSS and SVG files..."
${ROOT_DIR}/scripts/minify.sh
fi