diff --git a/helper b/helper index 74f47d4..0c76626 100755 --- a/helper +++ b/helper @@ -2,11 +2,7 @@ # Function to handle PHP Artisan commands php() { - if [[ "$1" == "artisan" ]]; then - docker compose exec fpm php artisan "${@:2}" - else - echo "Unknown php command" - fi + docker compose exec fpm "${@}" } # Function to handle Composer commands @@ -28,6 +24,11 @@ fix_storage() { docker compose exec fpm chmod -R ug+x bootstrap/cache } +# Function to handle NPM commands +npm() { + docker compose exec node npm "${@}" +} + # Function to initialize the composer.yml file init() { cat < composer.yml @@ -61,6 +62,12 @@ services: - MYSQL_DATABASE=cusport volumes: - ./.db:/var/lib/mysql + node: + hostname: node + image: node:lts + volumes: + - ./:/var/www/html/ + working_dir: /var/www/html EOL echo "composer.yml file created successfully!" }