if [ "${current_major_node_version}" = "${required_node_version}" ]; then
printf >&2 "${GREEN_FG}✔ Node${BLUE_FG} Version ${GREEN_FG}${current_node_version}${BLUE_FG} is ${GREEN_FG}installed${BLUE_FG}.\n"
else
printf >&2 "${RED_FG}✘ Wrong Node Version${YELLOW_FG} is installed!\n Version ${RED_FG}${required_node_version}${YELLOW_FG} is ${RED_FG}required${YELLOW_FG}.\n"
error = 1
fi
echo ""
# Installs the dependencies
[group('main')]
install:
cd .. && npm i --no-fund
session_name := "euph-website_frontend"
# Starts the local Development Setup
[group('main')]
up: halt
#!/bin/bash
source ../bin/just/colors.sh
cd .. && screen -dmS {{ session_name }} npm run watch >> /dev/null
if [ $? -eq 0 ]; then
printf "${GREEN_FG}Frontend was started${CLEAR}\n"
else
printf "${RED_FG}Frontend didn't start${CLEAR}\n"
fi
# Stops the local Development Setup
[group('main')]
halt:
#!/bin/bash
source ../bin/just/colors.sh
screen -XS {{ session_name }} quit >> /dev/null
if [ $? -eq 0 ]; then
printf "${GREEN_FG}Frontend was stopped${CLEAR}\n"
fi
[group('main')]
attach:
#!/bin/bash
source ../bin/just/colors.sh
if screen -ls | grep -q {{ session_name }}; then
screen -r {{ session_name }}
else
printf "${RED_FG}Frontend is down${CLEAR}\n"
fi
linter_options := "All\nTS\nSCSS\nTwig"
# Lints all Files, or if specified only a specifc Set
[group('utility')]
lint linter="":
#!/bin/bash
chosen_linter=$(
printf "{{ linter_options }}" |\
fzf --header="Which linters should be run?" --height 6 -i -q "{{ linter }}" -1