diff --git a/devbox/devbox.local/cli/devbox b/devbox/devbox.local/cli/devbox index ca607ed..0c30901 100644 --- a/devbox/devbox.local/cli/devbox +++ b/devbox/devbox.local/cli/devbox @@ -128,16 +128,39 @@ devbox_usage() { printf "Command\n" printf " devbox : DevBox Command Line Tool for managing the local development environment.\n\n" + printf "Usage\n" + printf " devbox : Interactive mode to initialize development environment\n" + printf " devbox freeleaps : Initialize Freeleaps.com development environment\n" + printf " devbox : Initialize specific product development environment\n\n" + printf "Arguments\n" - printf " COMMAND [Required] : Specify the command to execute (e.g., init, deinit, start, stop, status, restart).\n\n" + printf " COMMAND [Required] : Specify the command to execute.\n" + printf " init, i : Initialize the local development environment.\n" + printf " deinit, d : De-initialize the local development environment.\n" + printf " start, s : Start services in the local development environment.\n" + printf " stop, p : Stop services in the local development environment.\n" + printf " status, t : Display status of services in the local environment.\n" + printf " restart, r : Restart services in the local environment.\n\n" printf "Global Arguments\n" printf " --help, -h : Show this help message and exit.\n" printf " --version, -v : Show version number.\n\n" printf "Examples\n" + printf " Initialize development environment interactively:\n" + printf " devbox\n\n" + printf " Initialize Freeleaps.com development environment:\n" + printf " devbox freeleaps\n\n" + printf " Initialize specific product development environment:\n" + printf " devbox \n\n" + printf " Initialize development environment with command:\n" + printf " devbox init\n\n" printf " Display help for the 'init' command:\n" printf " devbox init --help\n\n" + printf " Start all services:\n" + printf " devbox start\n\n" + printf " Start specific service:\n" + printf " devbox start --component=backend\n\n" printf " Display version information:\n" printf " devbox --version\n" echo @@ -1775,12 +1798,17 @@ if [[ "${START_FRONTEND}" == "true" ]]; then echo '============================================' pushd /home/devbox/freeleaps/frontend + echo "==> Installing dependencies..." + npm install lodash + + # echo "==> Starting frontend service..." baseline_file=\$(mktemp) echo "==> Creating a baseline file for the frontend service..." git status -s > "\$baseline_file" echo "==> Baseline file created: \$baseline_file" + # Check if the frontend service is already running according to the package.json and pnpm-lock.yaml files timestamps if [[ ! -d "node_modules" || "package.json" -nt "node_modules" || "pnpm-lock.yaml" -nt "node_modules" ]]; then echo "==> Installing/Updating frontend dependencies..."