diff --git a/.github/pre-commit b/.github/pre-commit index 41ee58af..708cabc2 100755 --- a/.github/pre-commit +++ b/.github/pre-commit @@ -9,17 +9,17 @@ #!/bin/sh set -e -rubyfiles=$(git diff --cached --name-only --diff-filter=ACM "*.rb" "Gemfile" | tr '\n' ' ') +rubyfiles=$(git diff --cached --name-only --diff-filter=ACM "*.rb" "Gemfile" "*.erb" | tr '\n' ' ') [ -z "$rubyfiles" ] && exit 0 # Standardize all ruby files echo "๐Ÿงน Formatting staged Ruby files using standardrb ($(echo $rubyfiles | wc -w | awk '{print $1}') total)" -echo "$rubyfiles" | xargs docker-compose run --rm web bundle exec standardrb --fix +echo "$rubyfiles" | xargs docker compose run -T --rm web bundle exec standardrb --fix # Add back the modified/prettified files to staging echo "$rubyfiles" | xargs git add echo "๐Ÿ“‹ Running tests with rspec" -docker-compose run --rm web bundle exec rspec --format progress +docker compose run -T --rm web bundle exec rspec --format progress exit 0 diff --git a/README.md b/README.md index 37ebb60f..4541bb16 100644 --- a/README.md +++ b/README.md @@ -23,16 +23,16 @@ edit .env with the appropriate environment variables start containers ```bash -docker-compose up -d +docker compose up -d ``` watch then build styles or scripts (optional) ```bash # styles -docker-compose run --rm web npm run watch-css +docker compose run --rm web npm run watch-css # scripts -docker-compose run --rm web npm run watch-js +docker compose run --rm web npm run watch-js ``` In a browser, go to http://localhost:4567 to see the website.