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() {
485485}
486486
487487findRoutes () {
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
493496}
494497
495498findPredefinedRoutes () {
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ if [[ "${DEV:-true}" == "true" ]] && [[ ! -z "$TAILWIND" ]]; then
1010 PID=$!
1111fi
1212
13+ export ROUTES_CACHE=$( mktemp)
14+
1315# remove any old subscriptions; they are no longer valid
1416rm -rf pubsub
1517
You can’t perform that action at this time.
0 commit comments