Code Monkey home page Code Monkey logo

gitbook-plugin-uml's People

Contributors

avenue68 avatar dependabot[bot] avatar gislik avatar hirocaster avatar kntmr avatar koppor avatar ronesam avatar sidiandi avatar stasson avatar tsuyoshicho avatar vowstar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gitbook-plugin-uml's Issues

All UML image are broken for executing `npm run serve` twice.

Problem

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.

Reproduce process

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.

Additional Info

  • When the first time to run npx honkit serve, _book/assets/images/uml dir is created and images are copied.
  • When the second time to run npx honkit serve, _book/assets dir is deleted automatically and not created.
  • $repository_root/assets/images/uml dir and the generated images are remains.
  • The same problem are happen for running npx honkit build twice.
  • When I delete $repository_root/assets/images/uml manually and run npx honkit serve, the problem was fixed temporary.

Plugin is not working with [!include] directive

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.
934c2c1d74a0fa88cde5f9c34e56afddace63269

I wonder if you still support this plugin and could fix this issue. Or could give us a tip how to fix it.

Two or more images in assets/ directory are not copied into _build/

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.

Ebook generate error occur in current HonKit

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.

[Bug] Unable to install and bulid the plugin in macos

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

Plugin is not working with relative paths

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.

honkit shows "Could not find the language 'uml'"

Problem

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"

Reproduce process

Building following code reproduces the problem

``` uml
@startuml
actor -> (usecase)
@enduml
```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.