From 1dae0c557c332868c411319a708e5b2423008fb9 Mon Sep 17 00:00:00 2001 From: Charlotte Van Petegem Date: Tue, 20 Aug 2024 14:28:48 +0200 Subject: [PATCH] shells: silverfin: add helper commands for common tasks --- shells/silverfin.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/shells/silverfin.nix b/shells/silverfin.nix index 364add3a..916b5312 100644 --- a/shells/silverfin.nix +++ b/shells/silverfin.nix @@ -20,7 +20,22 @@ pkgs.devshell.mkShell { git fetch -p ; git branch -r | awk '{print $1}' | egrep -v -f - <(git branch -vv | grep origin) | awk '{print $1}' | xargs -r git branch -D ''; } - + { + name = "reset-test-assets"; + category = "[general commands]"; + help = "Force reset test assets"; + command = '' + RAILS_ENV=test bundle exec rake webpacker:clobber && RAILS_ENV=test bundle exec rake webpacker:compile + ''; + } + { + name = "reset-dev-translations-js"; + category = "[general commands]"; + help = "Force reset translations for JS inclusion"; + command = '' + WEBPACKER_PRECOMPILE=false bundle exec rails assets:precompile + ''; + } ]; packages = with pkgs; [ chromedriver