_default: @bin/just/choose.sh {{ source_file() }} choose mod backend 'app/backend/mod.just' mod frontend 'app/frontend/mod.just' alias i := install alias start := up alias stop := halt alias clean := fresh # Checks whether the requriements are met [group('main')] check: #!/bin/bash source bin/just/colors.sh source bin/just/check.sh printf "${BLUE_BG}${BLACK_FG} Checking Justfile Requirements ${CLEAR}\n" check_cmd "jq" "jq" check_cmd "fzf" "fzf" check_cmd "screen" "screen" check_cmd "grep" "grep" check_cmd "printf" "Printf" check_cmd "sed" "sed" check_cmd "awk" "awk" check_cmd "cut" "cut" check_cmd "highlight" "highlight" if ((error > 0 )); then exit 1 fi echo "" just backend::check just frontend::check # Installs the dependencies [group('main')] install: -@just backend::install -@just frontend::install # Starts the local Development Setup [group('main')] up: halt check -@just backend::up -@just frontend::up # Stops the local Development Setup [group('main')] halt: -@just backend::halt -@just frontend::halt # Starts the local Development Setup Fresh, with no Cache and the reseted test Data [group('main')] fresh: halt install up @just backend::demo-data linter_options := "All\nPHP\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 7 -i -q "{{ linter }}" -1 ) case "$chosen_linter" in *All*) \ just frontend::lint all && just backend::lint;; *PHP*) just backend::lint ;; *TS*) just frontend::lint TS ;; *SCSS*) just frontend::lint SCSS ;; *Twig*) just frontend::lint TWIG ;; esac # Runs the Static Code Analysis [group('utility')] stan: @just backend::stan # Runs all Tests, or if specified only a specific Suite [group('utility')] test: @just backend::test # Create and Execute Migrations [group('utility')] migration: @just backend::migration