Skip to content

Commit

Permalink
Add watch task
Browse files Browse the repository at this point in the history
Also, turn digests off in development
  • Loading branch information
jon-kirwan committed Jan 17, 2024
1 parent fc5616d commit 4bed68f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Procfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
web: bin/rails server -p 3090
css: bin/rails dartsass:watch
8 changes: 8 additions & 0 deletions bin/dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env sh

if ! gem list foreman -i --silent; then
echo "Installing foreman..."
gem install foreman
fi

exec foreman start -f Procfile.dev "$@"
3 changes: 3 additions & 0 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
# Suppress logger output for asset requests.
config.assets.quiet = true

# To see the latest stylesheet changes, if running Sass in watch mode
config.assets.digest = false

# Raises error for missing translations.
config.i18n.raise_on_missing_translations = true

Expand Down
3 changes: 1 addition & 2 deletions startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ if [[ $1 == "--live" ]] ; then
set_env "gov.uk"
export GOVUK_PROXY_STATIC_ENABLED=true
export PLEK_SERVICE_STATIC_URI=${PLEK_SERVICE_STATIC_URI-https://assets.publishing.service.gov.uk}
./bin/dev
else
echo "ERROR: other startup modes are not supported"
echo ""
echo "https://docs.publishing.service.gov.uk/manual/local-frontend-development.html"
exit 1
fi

bundle exec rails s -p 3090

0 comments on commit 4bed68f

Please sign in to comment.