MermaidJS.Blazor icon indicating copy to clipboard operation
MermaidJS.Blazor copied to clipboard

Static assets missing in repo?

Open johankson opened this issue 2 years ago • 2 comments

Hi!

I'm a Blazor newbie so forgive me if I'm missing something obvious. I forked the repo and checked out the demo. I had to copy the /lib/ folder from the nuget package to get it to work in order to get a hold of the mermaid.min.js file.

Doing so made it work, but I got two diagrams rendered.

Am I missing something here?

johankson avatar Apr 10 '22 20:04 johankson

You're not missing anything. It was just poor planning on my part. 😬

The MermaidJS.Blazor project relies on libman to manage the static assets at design time. In hindsight, I should have added this as a pre-build step in the project, but what you'll need to do for now is:

Ensure libman is installed:

dotnet tool install -g Microsoft.Web.LibraryManager.Cli

Run libman restore from the src/MermaidJS.Blazor directory to pull down the library:

libman restore

DotJoshJohnson avatar Apr 11 '22 19:04 DotJoshJohnson

Seems like libman is x86/x64 only. I'm using a M1 mac (arm64). Couldn't npm be used (and then copy the assets from the node_modules folder? to make it work for all platforms?

johankson avatar Apr 11 '22 20:04 johankson