File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -485,11 +485,14 @@ writeHttpResponse() {
485
485
}
486
486
487
487
findRoutes () {
488
- cd pages
489
- for i in $( find . -type f,l -iname ' *.sh' \
490
- | sed ' s@^\./@@' ) ; do
491
- echo $i ;
492
- done
488
+ local SIZE
489
+ SIZE=$( stat -c " %s" $ROUTES_CACHE )
490
+ if [[ $SIZE -eq 0 ]]; then
491
+ cd pages
492
+ find . -type f,l -iname ' *.sh' | sed ' s@^\./@@' | tee $ROUTES_CACHE
493
+ else
494
+ cat $ROUTES_CACHE
495
+ fi
493
496
}
494
497
495
498
findPredefinedRoutes () {
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ if [[ "${DEV:-true}" == "true" ]] && [[ ! -z "$TAILWIND" ]]; then
10
10
PID=$!
11
11
fi
12
12
13
+ export ROUTES_CACHE=$( mktemp)
14
+
13
15
# remove any old subscriptions; they are no longer valid
14
16
rm -rf pubsub
15
17
You can’t perform that action at this time.
0 commit comments