vowstar / gitbook-plugin-uml Goto Github PK
View Code? Open in Web Editor NEWPlantUml plugin of gitbook/honkit which can draw UML graph in both markdown HTML and PDF
License: Apache License 2.0
PlantUml plugin of gitbook/honkit which can draw UML graph in both markdown HTML and PDF
License: Apache License 2.0
The following error occurs.
Error: [email protected] postinstall: `npm run getpuml && node scripts/get-vizjs.js`
Exit status 1
I set the version of node-plantuml to 0.9.0 in the package.json dependencies as fine.
UML diagrams are not shown (seems as broken link) on localhost serving (http://localhost:4000/
) by npx honkit serve
.
This is happen at the second time to run npx honkit serve
, without deleting any generated directories or files.
In the root dir of some Honkit's contents repository, emulating a "just after cloning" condition.
$ git clean -f
$ npm install
$ npx honkit serve
No problem is found until here. (All UML diagram are shown at http://localhost:4000/ )
Enter CTRL+C to stop serving process, then:
$ npx honkit serve
Access http://localhost:4000/
, this problem happens.
npx honkit serve
, _book/assets/images/uml
dir is created and images are copied.npx honkit serve
, _book/assets
dir is deleted automatically and not created.$repository_root/assets/images/uml
dir and the generated images are remains.npx honkit build
twice.$repository_root/assets/images/uml
manually and run npx honkit serve
, the problem was fixed temporary.Currently the generated image is pixelated on retina displays.
In our documentation build system we are using Honkit with your plugin.
We tried to use [!include] directive
The files we tested are as follows.
test.md
@startuml
!include test.pu
@enduml
test.pu
@startuml
interface List
List : int size()
List : void clear()
List <|.. ArrayList
@enduml
The generated svg resulted in an error.
I wonder if you still support this plugin and could fix this issue. Or could give us a tip how to fix it.
Related to #7
When markdown files contains multiple UML diagram, some image links in built HTML are broken and these diagram image is not shown in HTML.
More details, the link for UML defined in the FIRST position in markdown file is OK, but the others are always broken.
After building I checked the assets/
directory and I confirmed all images are generated, but only ONE image was copied into _build/assets/
directory.
see honkit/honkit#142 (comment)
Probably, gitbook-plugin-uml generate *.svg on finish:before.
However, HonKit copy resources on generateAssets.
There seems to be a plan to fix it as follows.
Generate *.svg on page:before and it will fix this issue?
Either way, it seems that the timing must be before generateAssets
.
When I first typed
gitbook install
I got
➜ pedia git:(refactor_tmp) ✗ gitbook install
info: installing 4 plugins using [email protected]
info:
info: installing plugin "uml"
info: install plugin "uml" (*) from NPM with version 1.0.1
internal/child_process.js:345
throw errnoException(err, 'spawn');
^
Error: spawn E2BIG
at ChildProcess.spawn (internal/child_process.js:345:11)
at exports.spawn (child_process.js:521:9)
at spawn (/Users/lei.wang1/.gitbook/versions/3.2.3/node_modules/npm/lib/utils/spawn.js:7:13)
at runCmd_ (/Users/lei.wang1/.gitbook/versions/3.2.3/node_modules/npm/lib/utils/lifecycle.js:237:14)
at runCmd (/Users/lei.wang1/.gitbook/versions/3.2.3/node_modules/npm/lib/utils/lifecycle.js:196:5)
at runPackageLifecycle (/Users/lei.wang1/.gitbook/versions/3.2.3/node_modules/npm/lib/utils/lifecycle.js:160:3)
at Array.<anonymous> (/Users/lei.wang1/.gitbook/versions/3.2.3/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
at LOOP (/Users/lei.wang1/.gitbook/versions/3.2.3/node_modules/npm/node_modules/slide/lib/chain.js:15:14)
at chain (/Users/lei.wang1/.gitbook/versions/3.2.3/node_modules/npm/node_modules/slide/lib/chain.js:20:5)
at lifecycle_ (/Users/lei.wang1/.gitbook/versions/3.2.3/node_modules/npm/lib/utils/lifecycle.js:131:3)
after I triggered the command the second time, the error gone. However I got another eror when build pages:
gitbook build ./ --log=debug --debug
➜ pedia git:(refactor_tmp) ✗ gitbook build ./ --log=debug --debug
debug: readme found at README.md
debug: summary file found at SUMMARY.md
debug: cleanup folder "/Users/lei.wang1/Github/mold/pedia/_book"
info: 11 plugins are installed
info: 10 explicitly listed
info: loading plugin "uml"... ERROR
PluginError: Error with plugin "uml": Cannot find module 'safe-buffer'
PluginError: Error with plugin "uml": Cannot find module 'safe-buffer'
at createError (/Users/lei.wang1/.gitbook/versions/3.2.3/node_modules/error/typed.js:31:22)
at new createError (/Users/lei.wang1/.gitbook/versions/3.2.3/node_modules/error/wrapped.js:88:19)
at /Users/lei.wang1/.gitbook/versions/3.2.3/lib/plugins/loadPlugin.js:67:23
at _fulfilled (/Users/lei.wang1/.gitbook/versions/3.2.3/node_modules/q/q.js:834:54)
at /Users/lei.wang1/.gitbook/versions/3.2.3/node_modules/q/q.js:863:30
at Promise.promise.promiseDispatch (/Users/lei.wang1/.gitbook/versions/3.2.3/node_modules/q/q.js:796:13)
at /Users/lei.wang1/.gitbook/versions/3.2.3/node_modules/q/q.js:857:14
at runSingle (/Users/lei.wang1/.gitbook/versions/3.2.3/node_modules/q/q.js:137:13)
at flush (/Users/lei.wang1/.gitbook/versions/3.2.3/node_modules/q/q.js:125:13)
at process._tickCallback (internal/process/next_tick.js:172:11)
Here my gitbook version:
➜ pedia git:(refactor_tmp) ✗ gitbook --version
CLI version: 2.3.0
GitBook version: 3.2.3
MacOS latest
Node latest
The uml is v 1.0.1
The package being published does not include #9.
https://www.npmjs.com/package/gitbook-plugin-uml
Would you update npm package?
In our documentation build system we are using Gitbook with your plugin.
Most of the time we worked with embedded UML, which worked as a charm.
Recently we tried to use this approach:
{% uml src="test.plantuml"%}{% enduml %}
and Gitbook failed with the Error: ENOENT: no such file or directory, open 'test.plantuml'
which is strange cause file was in the same folder as markdown that used it.
After short investigation I realized that plugin is trying to find this file not in the same folder with markdown file, but in the root of Gitbook working directory. Which is wrong, in my understanding, and changes the standard way of attaching assets in Gitbook.
I wonder if you still support this plugin and could fix this issue. Or could give us a tip how to fix it.
In v0.1.10, that's all ok.
In v0.1.11, it has broken image link.
git clone https://gist.github.com/a7088b874a7055e0f8b5fc2dcbf0131e.git
cd a7088b874a7055e0f8b5fc2dcbf0131e
gitbook install && gitbook serve
Honkit shows following error if you write markdown code block with language uml / puml / plantuml
inserting spaces between ```
and uml / puml / plantuml
could not find the language 'uml', did you forget to load/include a language module?
Error: Unknown language: "uml"
Building following code reproduces the problem
``` uml
@startuml
actor -> (usecase)
@enduml
```
node-plantuml accesses sourceforge, but in my environment, access is restricted.
However, this seems to be solved in 0.7.0.
markushedvall/node-plantuml#20
Please update node-plantuml to 0.7.0.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.