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

Document Deno example #232

Open
brodybits opened this issue May 9, 2021 · 7 comments
Open

Document Deno example #232

brodybits opened this issue May 9, 2021 · 7 comments
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers help-wanted External contributions welcome runtime
Milestone

Comments

@brodybits
Copy link
Member

brodybits commented May 9, 2021

We should investigate what needs to be done to support deno

@brodybits brodybits added enhancement help-wanted External contributions welcome needs investigation Information is missing and needs to be researched labels May 9, 2021
@karfau
Copy link
Member

karfau commented May 14, 2021

I think this is related to the discussion in #214
Not sure if we want to have a single issue for every potentially supported env before agreeing on a general strategy.
What do you think?

@karfau karfau closed this as completed Jun 10, 2021
@karfau
Copy link
Member

karfau commented Sep 4, 2021

Reopening, since it makes more sense to discuss support for any specific environment in specific issues.

@karfau karfau reopened this Sep 4, 2021
@karfau karfau added this to the planning 1.0.0 milestone Sep 4, 2021
@karfau karfau added the runtime label Sep 4, 2021
@karfau karfau changed the title Test & support with Deno (??) Support for Deno? Sep 4, 2021
@karfau karfau modified the milestones: planning 1.0.0, before 1.0.0 Dec 23, 2021
@taisukef
Copy link

for Deno users!
#316 (comment)

@karfau
Copy link
Member

karfau commented Jun 19, 2022

@taisukef thx for providing an example of what needs to be done to switch to modules and support deno.

I still think we need to find a way to additionally continue to support ES5.

I'm guessing that we could migrate the code like you did but put it into mjs files and add a build/transpilation step to continue to support ES5?
Ideally in a way that it doesn't break existing usages.

@marrus-sh
Copy link

i typically don’t have any problem with

import { DOMParser, XMLSerializer } from "https://esm.sh/@xmldom/xmldom@0.8.2";

(using esm.sh to handle the transpiling/compiling). i don’t use typescript though, so i can’t make any guarantees there.

native deno support would be nice, but the above might be useful for people trying to make this work as‐is.

@marrus-sh
Copy link

Deno supports importing from npm directly now; for example:

import { DOMParser, XMLSerializer } from "npm:@xmldom/xmldom@0.8.8";

I’m not sure what the state of TypeScript support is, but as far as JS is concerned, the above works for me.

@karfau
Copy link
Member

karfau commented Jun 29, 2023

That is true and awesome.

So it basically boils down to adding an example to the examples folder for documentation purposes.

PRs welcome.

@karfau karfau changed the title Support for Deno? Document Deno example Jun 29, 2023
@karfau karfau added documentation Improvements or additions to documentation good first issue Good for newcomers and removed needs investigation Information is missing and needs to be researched labels Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers help-wanted External contributions welcome runtime
Projects
None yet
Development

No branches or pull requests

4 participants