leaf
leaf copied to clipboard
A fake file system for Deno binaries
Wanted to use this library, and seems not much has changed recently. - Removed `Deno.emit` as deprecated, and now use `bundle` from `emit` library. - Replaced `Deno.run` as that will...
I'm using leaf with the current latest version of Deno (`1.30.3`) and when I run my compiled binary that uses leaf, I get this error: ``` error: Uncaught (in promise)...
As we only get Leaf code when we compile we can easily assume we are always an executable so that fixes #24
The changes in https://deno.com/blog/v1.19#deno-compile-now-works-more-reliably invalidates ```typescript const isExecutable: boolean = (Deno.mainModule == "file://$deno$/bundle.js"); ``` as `Deno.mainModule` contains the full path of the compiled file. The value is something like `file:///full/path/to/example/.cca844d9-1d71-0ea3-8b6c-8caee007a92c.js`
I want to compile using the current running Deno. I have a stripped deno which I want to run when doing the `Leaf.compile` step. ```typescript await runCmd(`cp /usr/local/bin/deno ${tempDir}/bin`); await...
I use PR #20 which works as intended. I can serve leaf managed files with a fallback to normal FS.
It would be really useful if Leaf supported functions like `stat`, `readDir`, `walkDir`, etc so that library functions expecting a whole filesystem (for example, [Opine's `send`](https://github.com/asos-craigmorten/opine/blob/df481ad0e09dae63c83bcfd78105e8f2ad83f738/src/utils/send.ts#L554), which uses stat and...
My app uses `import_map.json` and there is no option in leaf to use this. I see that leaf uses `Deno.emit` which allows you to specify import map. Which means that...