analytics.home-assistant.io/script/develop

22 lines
660 B
Bash
Executable File

#! /bin/sh
# Develop the site
# Stop on errors
set -e
cd "$(dirname "$0")/.."
rm -rf ./site/dist
mkdir -p ./site/src/_data
curl -sSLf https://analytics.home-assistant.io/data.json | jq . > ./site/src/_data/data.json
curl -sSLf https://analytics.home-assistant.io/custom_integrations.json | jq . > ./site/src/_data/custom_integrations.json
curl -sSLf https://analytics.home-assistant.io/addons.json | jq . > ./site/src/_data/addons.json
curl -sSLf https://www.home-assistant.io/integrations.json | jq . > ./site/src/_data/integration_details.json
if [ ! -d node_modules ]; then
script/bootstrap
fi
cd ./site
../node_modules/.bin/eleventy --watch --serve