-
-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publish standalone binaries #28
Comments
1 to this |
This would be great for projects in other languages that want to use Lume for technical documentation. I am wondering though, will a standalone binary still be able to import the config and the |
This is a fantastic idea and definitively I want that.
|
It looks like is a bundler bug: denoland/deno#8970 |
Looks like that bug may have been fixed now. Worth a try again? |
It keeps failing:
|
Bug reported here: denoland/deno#9346 |
Actually as I was doing more research into it, it turns out we would have to rewrite some of our code so we can support binaries. Because we can't dynamically import files relative to binaries we will have to rewrite it to read the file and then convert it to base64 and then dynamically import that, and we would have to wait for support for base64 data urls in binaries denoland/deno#9397.
|
In lume we don't have this problem (I think) but yep, looks like having to bundle the entire code to generate a self container binary generates some issues and reduce the flexibility. I'd like to have a different approach, for example, only transpile the typescript code but maintaining the ESM under a specific protocol. For example: |
@oscarotero How does Lume import the config file if it doesn't use dynamic imports? I think really that feature request may be the only way if we were to support binaries because of how you can't dynamically import files external to the binary. |
@shadowtime2000 Mmmm, you're right. I thought dynamic imports couln't load modules from the bundled library (Lume in my case), but they could load modules from the user's cwd. Something like this: async function cli() {
const file = Deno.cwd() './_config.js';
const mod = await import(file);
console.log(mod);
}
cli(); But now I can see that this is not available neither ( I guess that ATM, the only way to create executable binaries with Lume is using the import lume from "https://deno.land/x/lume/mod.js";
import cli from "https://deno.land/x/lume/cli.js";
const site = lume();
cli(Deno.args, site); But I need to edit the cli module to accept the site instance in the second argument. |
Given denoland/deno#8539 it would be nice to have lume binaries published (by CI) on each release.
The text was updated successfully, but these errors were encountered: