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

Expose default treeadapter #301

Closed
jacobbogers opened this issue Oct 2, 2019 · 3 comments · Fixed by #485
Closed

Expose default treeadapter #301

jacobbogers opened this issue Oct 2, 2019 · 3 comments · Fixed by #485

Comments

@jacobbogers
Copy link

jacobbogers commented Oct 2, 2019

I can now do:

const ta = require('parse5/lib/tree-adapters/default');

but aesthetically not gorgeous like the rest of this wonderful code and a bit of a hacky , could the default parser be exported as require('parse5/adaptor-default') or require(parse5/default-adaptor); or const { adapter } = require('parse5'); and expose it officially this way

My 2cts

@frank-dspeed
Copy link

frank-dspeed commented Jan 17, 2020

@jacobbogers vote 4 my issue #307 :) i will refactor to clean esm and produce babel cjs compatible version
#308

@jacobbogers
Copy link
Author

I think your proposal covers refactoring to ES2020 standard, but I just want expose "hidden" treeadapter, I will make PR for this, no worries, about your issue, lets discuss in your issue.

@frank-dspeed
Copy link

@jacobbogers i will refactor to ES2020 and compile down to what ever the consumer needs and that will expose everything as a module including the treeAdapter :)

import { treeAdapter } from 'es-parse5' 

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

Successfully merging a pull request may close this issue.

2 participants