Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@herbsjs/herbs2mermaid

herbsjs1.6kMIT2.0.1

A lib to help you generate mermaid diagrams from your herbs project

mermaid, herbsshelf, buchu, herbsjs

readme

CD Build codecov

herbs2mermaid

With Herbs2mermaid you can generate Mermaid Class Diagram or Flow Chat easely.

Installing

    $ npm install @herbsjs/herbs2mermaid

Functioning

To use the herbs2mermaid you must given a list of usecases or entities to generate class diagram or flow chart.

Using

The quickest way to use the herbs2mermaid is to install this packages in your project and use the functions bellow:

usecase2diagram: - Generate flow chart to a list of usecases

entity2diagram: - Generate class diagram to a list of entities

In your app or server project, import the herbs2mermaid functions


const { usecase2diagram, entity2diagram } = require('@herbsjs/herbs2mermaid')

And call the shelf into you prefered rest route


const classDiagram = entity2diagram(entities)
console.log(classDiagram)


const usecasesFlowChart = usecase2diagram(usecases)
console.log(usecasesFlowChart)

If your project has a readme.md, this content should be shown at the beginning of the project. If you want to use a custom readme, you can specify on startup:


const shelf = renderShelfHTML('Project Name', usecases(), entities, './custom-readme.md')

You can see the full functionality into the TODO-LIST ON HERBS repository

TODO

  • <input disabled="" type="checkbox"> Complex scenarios with recursive IfElse Step
  • <input disabled="" type="checkbox"> Complex scenarios with recursive Multi Level Step
  • <input disabled="" type="checkbox"> Include options to render diagram to Vertical or Horizontal posistion

Contribute

Come with us to make an awesome herbs2mermaid.

Now, if you do not have the technical knowledge and also have intended to help us, do not feel shy, click here to open an issue and collaborate their ideas, the contribution may be a criticism or a compliment (why not?)

If you would like to help contribute to this repository, please see CONTRIBUTING

License

herbsshelf is released under the MIT license

changelog

2.0.1 (2023-07-03)

Bug Fixes

  • entity2diagram: fix display of Array Fields in HerbsShelf (1af4914)

2.0.0 (2023-03-07)

Bug Fixes

  • package.json: up herbs version (549913d)

Continuous Integration

BREAKING CHANGES

  • upgrade buchu to 2.0

1.2.0 (2022-09-05)

Features

  • release: create a new release (ef7a125)

1.1.1 (2022-08-15)

Performance Improvements

  • herbs: update herbs dependencies (b2fef5f)