b-fuze / deno-dom

Browser DOM & HTML parser in Deno
https://jsr.io/@b-fuze/deno-dom
MIT License
409 stars 48 forks source link

Publish on npm? #158

Open BenjaminAster opened 7 months ago

BenjaminAster commented 7 months ago

Nothing about this package is Deno-specific. Node.js currently can't run it because of TypeScript and .ts file imports, but Bun for example can (I tried it out). It would be awesome if this package would be published to npm, which would be as simple as:

EmNudge commented 7 months ago

You should be able to use this package in bun (not fully tested) through a direct github install.

pnpm i github:b-fuze/deno-dom

And use it as you would in deno, minus the url

import {
  DOMParser,
  Element,
} from "deno-dom/deno-dom-wasm.ts";

There's no version pinning, but this package wasn't meant to work in Node/Bun anyway and creating an npm release may introduce future maintenance burden.