Skip to content

Commit 670154a

Browse files
committed
Fix build-all and add utility for reloading deno cache
1 parent 3655aee commit 670154a

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

justfile

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
alias b := build
22
alias l := lint
33
alias t := test
4+
alias reload-all := reload-all-deno-cache
45

56
examples := "deno-fresh express faas-experimental fastify hono-bun react-app-experimental"
67

@@ -30,7 +31,8 @@ build-parcel-transformer:
3031
build-typescript-plugin:
3132
cd packages/typescript-plugin; just build
3233

33-
build-all: build build-examples build-parcel-transformer build-typescript-plugin
34+
# NOTE - Build the non-deno things first, then the deno things (this order is important)
35+
build-all: build-parcel-transformer build-typescript-plugin build build-examples
3436

3537
test:
3638
deno test {{test_permissions}} packages/autometrics
@@ -89,6 +91,17 @@ clean-typescript-plugin:
8991

9092
clean-all: clean clean-examples clean-parcel-transformer clean-typescript-plugin
9193

94+
reload-all-deno-cache:
95+
#!/usr/bin/env bash
96+
set -euxo pipefail
97+
for package in {{lib_packages}}; do
98+
pushd "packages/$package"
99+
# Ignore directories named `tests` or `dist` or `node_modules`
100+
# Then reload the Deno cache for any imports in files that end in .ts or .js
101+
find . \( -type d \( -name "tests" -o -name "dist" -o -name "node_modules" \) -prune \) -o \( -type f \( -name "*.ts" \) -exec deno cache --reload {} + \)
102+
popd
103+
done
104+
92105
fix:
93106
deno run {{biome_permissions}} npm:@biomejs/biome check --apply-unsafe packages
94107

0 commit comments

Comments
 (0)