-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
mermaid without browser #260
Comments
I agree. That would be a good function. It would impact the CLI in a positive way. It comes down to providing a document containing a DOM object which is used by d3. I have not worked so much directly with for instance phantomJS. I'll put this as help wanted for now! Lets hope that someone are interested in coding this. |
I just have an idea: https://github.com/mhart/react-server-example I have checked the phantomJS project. It seems that it is not being actively developed. It doesn't support OS 10.11 at the moment. |
+1 |
It's not about the issue, but i made a webpack loader that helps to generate PNG files from mermaid diagrams. https://github.com/popul/mermaid-loader It can help :) |
@popul, could you please explain how do you turn *.mmd into png? I checked your code but I really don't get it. Are you using phantomjs to do the trick or something else? Update: it seems that node_modules/.bin/mermaid is able to create png |
I just run Mermaid CLI into the webpack loader. https://github.com/popul/mermaid-loader/blob/master/index.js#L8 ...
var binPath = './node_modules/.bin/mermaid';
... https://github.com/popul/mermaid-loader/blob/master/index.js#L87 ...
childProcess.execFile(binPath, childArgs, function(err, stdout, stderr) {
... I tried to generate png server side, but |
I removed phantomjs-prebuilt in my fork, and added puppeteer. But, this uses |
Puppeteer is good! I like it. I am planning to to replace Phantom with puppeteer in future official release. |
Closing it, since I am the creator of this issue. |
…yarn/develop/eslint-7.30.0 Bump eslint from 7.29.0 to 7.30.0
Hi, can this issue be reopened? |
I want to do it in pure node.js:
Currently it is not possible: https://github.com/knsv/mermaid/blob/master/src/mermaidAPI.js#L486
The text was updated successfully, but these errors were encountered: