tessus
1
After the refactoring I have a bit of a problem updating Mermaid.
Previously I had to change the package.json
files and update the assets.
But an npm i
in the root dir does not create the assets, or at least they are no longer in the source tree and thus ignored by git.
What is the correct process for updating Mermaid these days?
I thought I'd update 8.8.1 -> 8.8.4....
I can never remember how to do it. But I think the step you're missing is running npm run buildAssets
from the packages/renderer
directory.
tessus
3
Yep, but I thought this is done during npm i
in the root dir. Or at least it should be.
tessus
4
After npm run buildAssets
, npm i
has to be run in the root as well.
This will create the proper files for mobile:
packages/app-mobile/pluginAssets/index.js
packages/app-mobile/pluginAssets/mermaid/mermaid.min.js.base64.js
tessus
5
Here's the complete process, since it's a bit of a back and forth:
- Update the version in
packages/renderer/package.json
- run
npm i
in the root dir (to install the new Mermaid package)
- go to
packages/renderer/
and run npm run buildAssets
(creates the new asset)
- run
npm i
in the root dir (to create the files for mobile)