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

update Mermaid renders #25

Closed
wants to merge 2 commits into from
Closed

update Mermaid renders #25

wants to merge 2 commits into from

Conversation

alixander
Copy link
Contributor

Mermaid released new CLI, which these renders are now upgraded to.

closes #24

notably, chess and wiiu examples now don't error!

@sidharthv96
Copy link

Thanks, @alixander, for the ultra-fast response!!

@sidharthv96
Copy link

flowchart LR
    root
    root --> childA(child A)
    root --> childB(child B)
    root --> childC(child C)
    childA --> grandChildAA(grand child AA)
    childA --> grandChildAB(grand child AB)
    childA --> grandChildAC(grand child AC)
    childA --> grandChildAD(grand child AD)
    childB --> grandChildBA(grand child BA)
    grandChildBA --> grandGrandChildBAA(grand grand child BAA)
Loading

Just noticed that flowchart LR makes the trees similar.

image

Copy link
Contributor

@aloisklink aloisklink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great :) Thanks for the update.

This website looks gorgeous! So does D2 (I especially love the SQL table view/syntax).

As a side-note, if you ever cross-compile D2 to WASM so that D2 runs in a browser, it should be relatively easy to add D2 as a Mermaid plugin, if you are interested in harnessing the Mermaid eco-system.

Comment on lines +25 to 26
# v9.2.2
mmdc -i src/examples/$ex/syntax/mermaid -o src/examples/$ex/render/mermaid_dagre.svg
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the way, if you have npx installed on your computer (it's usually included with new-ish versions of Node.JS and npm v7+), it might be better to do:

Suggested change
# v9.2.2
mmdc -i src/examples/$ex/syntax/mermaid -o src/examples/$ex/render/mermaid_dagre.svg
npx --yes --package @mermaid-js/mermaid-cli@9.2.2 -- \
mmdc -i src/examples/$ex/syntax/mermaid -o src/examples/$ex/render/mermaid_dagre.svg

This will automatically install @mermaid-js/[email protected] into a NPM cache folder and run it.

You can also replace the 9.2.2 with latest, and it should auto-update with the latest version, but generally for CI, you'd want to manually control versions.

If you leave the version blank (e.g. @mermaid-js/mermaid-cli), it should auto-pick the version from your package.json file if you stick @mermaid-js/mermaid-cli in your dependencies/devDependencies. This is usually the best way of doing things, because then you can use a program like GitHub's Dependabot to automatically give you updates.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for pointing this out @aloisklink

I changed it to use npx in #33

nhooyr pushed a commit that referenced this pull request Dec 13, 2022
nhooyr pushed a commit that referenced this pull request Dec 13, 2022
From #25

Closes #24
Closes #25
nhooyr pushed a commit that referenced this pull request Dec 13, 2022
@nhooyr
Copy link
Contributor

nhooyr commented Dec 13, 2022

Closing in favour of #34

@nhooyr nhooyr closed this Dec 13, 2022
nhooyr pushed a commit that referenced this pull request Dec 13, 2022
From #25

Closes #24
Closes #25
nhooyr pushed a commit that referenced this pull request Dec 13, 2022
nhooyr pushed a commit that referenced this pull request Dec 15, 2022
From #25

Closes #24
Closes #25
nhooyr pushed a commit that referenced this pull request Dec 15, 2022
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 this pull request may close these issues.

Error in Mermaid comparison
4 participants