From e53b2fe12196db639640aea24ce4a85b0f609b88 Mon Sep 17 00:00:00 2001 From: Johann Kellerman Date: Wed, 25 Jan 2017 02:20:18 +0200 Subject: [PATCH] [script] Only bootstrap frontend if npm installed (#5507) * [scripts] Only bootstrap frontend if npm installed * Message if not frontend dev possible * yarn --- script/bootstrap | 7 ++++++- script/bootstrap_frontend | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/script/bootstrap b/script/bootstrap index 4e77ba60ed5..c6d4a94be94 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -6,4 +6,9 @@ set -e cd "$(dirname "$0")/.." script/bootstrap_server -script/bootstrap_frontend + +if [ -x "$(command -v yarn >/dev/null)" ]; then + script/bootstrap_frontend +else + echo "Frontend development not possible without Node/yarn" +fi diff --git a/script/bootstrap_frontend b/script/bootstrap_frontend index 296f56c8f88..ed3321b1d93 100755 --- a/script/bootstrap_frontend +++ b/script/bootstrap_frontend @@ -12,10 +12,10 @@ git submodule update cd homeassistant/components/frontend/www_static/home-assistant-polymer # Install node modules -npm install +yarn install # Install bower web components. Allow to download the components as root since the user in docker is root. ./node_modules/.bin/bower install --allow-root -npm run setup_js_dev +yarn run setup_js_dev cd ../../../../..