1
0
mirror of https://github.com/avatao-content/test-tutorial-framework synced 2025-06-28 10:35:12 +00:00

Refactor frontend stuff to libhack/frontend.sh

This commit is contained in:
Kristóf Tóth
2018-06-15 16:03:26 +02:00
parent 6248da24e7
commit cdbae9f39e
2 changed files with 19 additions and 12 deletions

14
hack/libhack/frontend.sh Normal file
View File

@ -0,0 +1,14 @@
# Requires context:
# - FRONTEND_PATH: absolute path of frontend repo
# - CHALLENGE_PATH: absolute path of challenge repo
frontend::run() {
local frontend_in_challenge="${CHALLENGE_PATH}/solvable/frontend"
if [[ "$(find "${frontend_in_challenge}" | wc -l)" -gt 2 ]];then
cd "${frontend_in_challenge}"
else
cd "${FRONTEND_PATH}"
fi
yarn start
}