From 8694bdc3b8f487016775d397cc56aab196fbee3e Mon Sep 17 00:00:00 2001 From: Jose Farias <31393016+josefarias@users.noreply.github.com> Date: Sun, 13 Oct 2024 18:21:57 -0600 Subject: [PATCH] Build library as part of developing (#216) We have to do this as we're now only importing the edm build as per https://github.com/josefarias/hotwire_combobox/pull/209 --- CONTRIBUTING.md | 2 ++ Procfile.dev | 2 ++ bin/dev | 7 ++++++- bin/test | 8 +++++++- bin/test_system | 8 +++++++- 5 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 Procfile.dev diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cc4a7108..7280fce9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,6 +14,8 @@ $ bin/test $ bin/test_system ``` +You can optionally pass the path to a specific test. + ## Running the dummy app ```bash diff --git a/Procfile.dev b/Procfile.dev new file mode 100644 index 00000000..e0126c73 --- /dev/null +++ b/Procfile.dev @@ -0,0 +1,2 @@ +web: bin/rails server -b '0.0.0.0' -p 3033 +js: yarn build --watch diff --git a/bin/dev b/bin/dev index 49b6fa9f..490c0d91 100755 --- a/bin/dev +++ b/bin/dev @@ -1,2 +1,7 @@ #!/usr/bin/env bash -bin/rails s +if ! gem list foreman -i --silent; then + echo "Installing foreman..." + gem install foreman +fi + +exec foreman start -f Procfile.dev "$@" diff --git a/bin/test b/bin/test index 8f111f9a..dcf6f8af 100755 --- a/bin/test +++ b/bin/test @@ -1,2 +1,8 @@ #!/usr/bin/env bash -bundle exec rake app:test +yarn build + +if [ $# -eq 0 ]; then + bundle exec rake app:test +else + bundle exec rails test "$@" +fi diff --git a/bin/test_system b/bin/test_system index f42c6103..4e600c36 100755 --- a/bin/test_system +++ b/bin/test_system @@ -1,2 +1,8 @@ #!/usr/bin/env bash -bundle exec rake app:test:system +yarn build + +if [ $# -eq 0 ]; then + bundle exec rake app:test:system +else + bundle exec rails test "$@" +fi