Skip to content
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.

es6 syntax #1

Open
davibe opened this issue Jul 24, 2019 · 4 comments
Open

es6 syntax #1

davibe opened this issue Jul 24, 2019 · 4 comments

Comments

@davibe
Copy link

davibe commented Jul 24, 2019

this module is using import .. from .. es6 module syntax. Should it be transpiled before publishing ? Because afaik node.js does not support that yet so the module fails importing in plain node.js projects

@agoose77
Copy link
Owner

Yes, I'm using this in another project which gets transpiled. Feel free to make a PR - I don't have much time to look at this just yet! Cheers

@davibe
Copy link
Author

davibe commented Jul 26, 2019

I have tried, it's simple. However it's useless because mermaid.js seems to use window, which is not available in node :( mermaid-js/mermaid#485

To give more context I am using parceljs to compile markdown files to a final static app. It is working great for markdown-it, css, syntax hilight with hl.js, but i am missing mermaid.js diagrams, so...

@davibe
Copy link
Author

davibe commented Jul 26, 2019

@agoose77
Copy link
Owner

agoose77 commented Jul 26, 2019

Thanks for taking a look.
I'm not really familiar with node / JS beyond a surface level. Can you use something like puppeteer to invoke mermaid?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants