MaxMelcher / AzureDevOps.WikiPDFExport

Export Azure DevOps Wiki to PDF
MIT License
191 stars 65 forks source link

mermaid.min.js is not found if the tool is bundled into an exe #23

Closed jkanczler closed 4 years ago

jkanczler commented 4 years ago

Workaround for now: copy the mermaid.min.js file next to the executable, so it'll find the JavaScript in case of using -m option.

MaxMelcher commented 4 years ago

Thanks - that should be easy to fix

Get Outlook for iOShttps://aka.ms/o0ukef


From: József Kanczler notifications@github.com Sent: Monday, July 27, 2020 1:33:14 PM To: MaxMelcher/AzureDevOps.WikiPDFExport AzureDevOps.WikiPDFExport@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [MaxMelcher/AzureDevOps.WikiPDFExport] mermaid.min.js is not found if the tool is bundled into an exe (#23)

Workaround for now: copy the mermaid.min.js file next to the executable, so it'll find the JavaScript in case of using -m option.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/MaxMelcher/AzureDevOps.WikiPDFExport/issues/23, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAH3LN4ULJPMZWNUXDFE4D3R5VQXVANCNFSM4PIVNXCA.

jkanczler commented 4 years ago

Yep, but I've created this issue to discuss the options.

I would prefer a new option too, --mermaidjs-path to be able to use a newer or older version of mermaid.js, if the consumer would like to this.

And if --mermaidjs-path is not defined, then the embedded can be used.

What do you think?

MaxMelcher commented 4 years ago

I'd say --mermaidjs-path follows the logic of --chrome-path. If not specified, download it.

Another option could be to link to the online version here: var mermaid = $"<script>{File.ReadAllText("mermaid.min.js")}</script>"; and replace it with var mermaid = $"<script src="https://cdnjs.cloudflare.com/ajax/libs/mermaid/8.6.4/mermaid.js"></script>";

what you think?

jkanczler commented 4 years ago

Looks good for me. I'm going to implement it tonight and create a pull request.

Update: actually, in the beginning, I implemented the CDN version. Then I changed my mind and used the local version. :-)

MaxMelcher commented 4 years ago

Awesome 😎

Get Outlook for iOShttps://aka.ms/o0ukef


From: József Kanczler notifications@github.com Sent: Tuesday, July 28, 2020 3:49:25 PM To: MaxMelcher/AzureDevOps.WikiPDFExport AzureDevOps.WikiPDFExport@noreply.github.com Cc: Max Melcher melcher.maximilian@gmail.com; Comment comment@noreply.github.com Subject: Re: [MaxMelcher/AzureDevOps.WikiPDFExport] mermaid.min.js is not found if the tool is bundled into an exe (#23)

Looks good for me. I'm going to implement it tonight and create a pull request.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/MaxMelcher/AzureDevOps.WikiPDFExport/issues/23#issuecomment-665051584, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAH3LN3RJDHAGWURS2M6Z53R53JOLANCNFSM4PIVNXCA.