#!/bin/bash RUN="docker-compose run --rm" ansi() { echo -e "\e[${1}m${*:2}\e[0m"; } bold() { ansi 1 "$@"; } # italic() { ansi 3 "$@"; } underline() { ansi 4 "$@"; } # strikethrough() { ansi 9 "$@"; } # red() { ansi 31 "$@"; } name=$(basename $0) command=$1 args=${@:2} case $command in sh) $RUN mermaid sh -c "npx $args" ;; pnpm) $RUN mermaid sh -c "npx pnpm $args" ;; dev) $RUN --service-ports mermaid sh -c "npx pnpm run dev" ;; docs:dev) $RUN --service-ports mermaid sh -c "npx pnpm run --filter mermaid docs:dev:docker" ;; cypress) $RUN cypress $args ;; help) # Alignment of help message must be as it is, it will be nice looking when printed usage=$( cat <