Skip to content
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

Documentation on how to use outside of Node (in the browser / Deno) #290

Open
lino-levan opened this issue May 9, 2023 · 3 comments
Open

Comments

@lino-levan
Copy link

Problem to solve
I would love to use html-to-text in Deno.

What works
I can kind of hack this in by using esm.sh, but it's not ideal.

What is missing
A native ESM / Deno version using web APIs would be nice

How the missing feature should be implemented
Not entirely sure, I don't imagine it would take a lot of work since I don't see a reason to use node-specific APIs.

Bigger picture
I think that ESM modules are the future of javascript in general, so either converting this module to ESM, releasing a build with ESM, or improving docs on how to import this using web standard imports would be nice.

@KillyMXI
Copy link
Member

KillyMXI commented May 9, 2023

What exact problem you have with ESM?
As of 9.0.0, html-to-text is already a mixed mode package and uses ESM syntax internally.

html-to-text doesn't depend on Node APIs anymore - it is used in web projects successfully.

html-to-text depends on some packages that are not in Deno. Some are not maintained by me and have little prospect to be moved forward in any way by maintainers.

I know Deno has introduced Node dependencies support, but I don't know whether I should be bothered to explore that, since that should also allow you to reference html-to-text.

@lino-levan
Copy link
Author

It appears that esm.sh works very well for this package, so I guess this issue is more "please write documentation on how to use outside of node (in the browser / Deno)". Rather than a "this doesn't work please fix".

@KillyMXI
Copy link
Member

KillyMXI commented May 9, 2023

Ok.
I basically have no idea what to write though.
Making a website for html-to-text is in the backlog, but I don't know when it will happen.
Despite having some my packages in Deno, I don't have Deno-first projects and unfamiliar with idiomatic ways to do things there.

Rewriting the documentation - planned, but no ETA. Although this can be taken as I shouldn't be worried much about current Readme content, and it can be a field for experimentation.

Anyone can also just write down how-tos/recipes in Discussions.

But I withhold from using the "help wanted" badge, because even managing contributions can bring too much anxiety in the current situation.

@KillyMXI KillyMXI changed the title Publish to Deno / release an ESM version Documentation on how to use outside of Node (in the browser / Deno) May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants