Reputation: 15356
Executing deno run script.ts
first time is slow, and the second time is faster.
Is there some pre-compile command, to compile and cache scripts, but don't run it?
Upvotes: 2
Views: 411
Reputation: 21
You can compile a Deno script into a standalone binary using deno compile
.
deno compile https://deno.land/std/examples/welcome.ts
./welcome # Run executable
Upvotes: 2
Reputation: 31254
You can fetch and compile modules into your local cache using deno cache script.ts
.
You can also use deno cache --reload script.ts
to invalidate the cache and then refetch and recompile.
Reference: Reloading modules | Manual | Deno
Upvotes: 3