dev: improve postgrest-watch experience
* speed up io tests * avoid infinite loop while watching io tests * improve auto-complete with postgrest-watch postgrest-run * detect when files are added or deleted
This commit is contained in:
committed by
Wolfgang Walther
parent
7d6d015822
commit
d218a9eaff
+3
-1
@@ -14,7 +14,9 @@ let
|
||||
''
|
||||
rootdir="$(${git}/bin/git rev-parse --show-toplevel)"
|
||||
|
||||
${silver-searcher}/bin/ag -l . "$rootdir" | ${entr}/bin/entr -r "$@"
|
||||
while true; do
|
||||
(! ${silver-searcher}/bin/ag -l . "$rootdir" | ${entr}/bin/entr -dr "$@")
|
||||
done
|
||||
'';
|
||||
|
||||
pushCachix =
|
||||
|
||||
+4
-2
@@ -16,7 +16,8 @@ let
|
||||
${nixpkgs-fmt}/bin/nixpkgs-fmt "$rootdir" > /dev/null 2> /dev/null
|
||||
|
||||
# Format Haskell files
|
||||
${silver-searcher}/bin/ag -l -g '\.l?hs$' . "$rootdir" \
|
||||
# --vimgrep fixes a bug in ag: https://github.com/ggreer/the_silver_searcher/issues/753
|
||||
${silver-searcher}/bin/ag -l --vimgrep -g '\.l?hs$' . "$rootdir" \
|
||||
| xargs ${stylish-haskell}/bin/stylish-haskell -i
|
||||
'';
|
||||
|
||||
@@ -35,7 +36,8 @@ let
|
||||
rootdir="$(${git}/bin/git rev-parse --show-toplevel)"
|
||||
|
||||
# Lint Haskell files
|
||||
${silver-searcher}/bin/ag -l -g '\.l?hs$' "$rootdir" \
|
||||
# --vimgrep fixes a bug in ag: https://github.com/ggreer/the_silver_searcher/issues/753
|
||||
${silver-searcher}/bin/ag -l --vimgrep -g '\.l?hs$' "$rootdir" \
|
||||
| xargs ${hlint}/bin/hlint -X QuasiQuotes -X NoPatternSynonyms
|
||||
'';
|
||||
in
|
||||
|
||||
+2
-1
@@ -13,6 +13,7 @@
|
||||
, postgrest
|
||||
, postgrestStatic
|
||||
, postgrestProfiled
|
||||
, procps
|
||||
, runtimeShell
|
||||
}:
|
||||
let
|
||||
@@ -78,7 +79,7 @@ let
|
||||
name
|
||||
''
|
||||
env="$(cat ${postgrest.env})"
|
||||
export PATH="$env/bin:${curl}/bin:$PATH"
|
||||
export PATH="$env/bin:${curl}/bin:${procps}/bin:$PATH"
|
||||
|
||||
rootdir="$(${git}/bin/git rev-parse --show-toplevel)"
|
||||
cd "$rootdir"
|
||||
|
||||
Reference in New Issue
Block a user