Deno Dig (/ˈdiːnoʊ ˈdɪɡ/) aka 🦖🍆 is a tool that excavates application code and npm packages from stand-alone Deno binaries.
It can handle all the different iterations of deno compile
:
>=1.6.0 <1.7.0
: Bundle appended to the Deno binary>=1.7.0 <1.33.3
: Metadata + bundle appended to the Deno binary>=1.33.3 <1.46
: eszip appended to the Deno binary (introduction of npm package support)>= 1.46
: eszip included in an object file section of the Deno binary
I've written an article where I go into more details about the whole process.
Usage: DenoDig [OPTIONS] --input <INPUT>
Options:
-i, --input <INPUT>
Input file path (required)
-o, --output-directory <OUTPUT_DIRECTORY>
Output directory (optional, defaults to the current working directory)
-h, --help
Print help
-V, --version
Print version
DenoDigDemo.mp4
The web
directory contains a sexy webpage for the Wasm build of the deno-dig-lib
.
The Wasm blob and JavaScript glue is not included in the repository. In order to build them, you need wasm-pack installed.
Now you can do something like this:
cd deno-dig-lib
wasm-pack build --target web --release --no-typescript --no-pack --out-dir "../web/pkg"
cd ../web
python3 -m http.server