Skip to content

Commit 737e95c

Browse files
authored
Merge pull request #1278 from jgreywolf/1264-UpdatedDocumentationFoUsages
1264-Update documentation
2 parents f2e5c91 + 4b064dc commit 737e95c

File tree

3 files changed

+222
-58
lines changed

3 files changed

+222
-58
lines changed

README.md

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,43 @@
55
<!-- </Remove this in the future> -->
66

77
# mermaid [![Build Status](https://travis-ci.org/mermaid-js/mermaid.svg?branch=master)](https://travis-ci.org/mermaid-js/mermaid) [![NPM](https://img.shields.io/npm/v/mermaid)](https://www.npmjs.com/package/mermaid) [![Coverage Status](https://coveralls.io/repos/github/mermaid-js/mermaid/badge.svg?branch=master)](https://coveralls.io/github/mermaid-js/mermaid?branch=master) [![Join our Slack!](https://img.shields.io/static/v1?message=join%20chat&color=9cf&logo=slack&label=slack)](https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE) [![This project is using Percy.io for visual regression testing.](https://percy.io/static/images/percy-badge.svg)](https://percy.io/Mermaid/mermaid)
8+
89
<!-- <Main description> -->
9-
__Generate diagrams, charts, graphs or flows from markdown-like text via javascript.__
10-
See our [documentation](http://mermaid-js.github.io/mermaid/) and start simplifying yours. Play in our [live editor](https://mermaidjs.github.io/mermaid-live-editor/) or jump straight to the [installation and usage](http://mermaid-js.github.io/mermaid/#/usage).
11-
<!-- </Main description> -->
10+
__mermaid is a Javascript based diagramming and charting tool. It generates diagrams flowcharts and more, using markdown-inspired text for ease and speed.__
11+
12+
Check out the list of [Integrations and Usages of Mermaid](./docs/integrations.md)
13+
14+
:trophy: **Mermaid was nominated and won the [JS Open Source Awards (2019)](https://osawards.com/javascript/#nominees) in the category "The most exciting use of technology"!!! Thanks to all involved, people committing pull requests, people answering questions and special thanks to Tyler Long who is helping me maintain the project.**
15+
16+
## New diagrams in 8.4
17+
18+
With version 8.4 class diagrams have got some new features, bug fixes and documentation. Another new feature in 8.4 is the new diagram type, state diagrams.
19+
20+
![Image show the two new diagram types](.docs/img/new-diagrams.png)
21+
22+
## Special note regarding version 8.2
1223

13-
:trophy: _"The most exciting use of technology"_ - [JS Open Source Awards (2019)](https://osawards.com/javascript/#nominees)
24+
In version 8.2 a security improvement was introduced. A securityLevel configuration was introduced which sets the level of trust to be used on the parsed diagrams.
25+
26+
- **true**: (default) tags in text are encoded, click functionality is disabled
27+
- false: tags in text are allowed, click functionality is enabled
28+
29+
Closed issues:
30+
31+
⚠️ **Note** : This changes the default behaviour of mermaid so that after upgrade to 8.2, if the securityLevel is not configured, tags in flowcharts are encoded as tags and clicking is prohibited.
32+
33+
If your application is taking resposibility for the diagram source security you can set the securityLevel accordingly. By doing this clicks and tags are again allowed.
34+
35+
```javascript
36+
mermaidAPI.initialize({
37+
securityLevel: 'loose'
38+
});
39+
```
40+
41+
For more information and help in getting started, please view our [documentation](http://mermaid-js.github.io/mermaid/) and start simplifying yours. Play with our [live editor](https://mermaidjs.github.io/mermaid-live-editor/) or jump straight to the [installation and usage](http://mermaid-js.github.io/mermaid/#/usage).
42+
<!-- </Main description> -->
1443

44+
__The following are some examples of the diagrams, charts and graphs that can be made using mermaid and the Markdown-inspired text specific to it. Click here jump into the [text syntax](https://mermaid-js.github.io/mermaid/#/n00b-syntaxReference).__
1545
<table>
1646
<!-- <Flowchart> -->
1747
<tr><td colspan=2 align="center">

docs/README.md

Lines changed: 53 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,33 @@
1+
# Mermaid
2+
13
[![Build Status](https://travis-ci.org/mermaid-js/mermaid.svg?branch=master)](https://travis-ci.org/mermaid-js/mermaid)
24
[![Coverage Status](https://coveralls.io/repos/github/knsv/mermaid/badge.svg?branch=master)](https://coveralls.io/github/knsv/mermaid?branch=master)
35
[![Join the chat at https://gitter.im/knsv/mermaid](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/knsv/mermaid?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
46

5-
# mermaid
7+
![banner](./img/header.png)
8+
9+
Generation of diagrams and flowcharts from text in a similar manner as markdown.
10+
11+
Ever wanted to simplify documentation and avoid heavy tools like Visio when explaining your code?
12+
13+
This is why mermaid was born, a simple markdown-like script language for generating charts from text via javascript.
14+
15+
Check out the list of [Integrations and Usages of Mermaid](./integrations.md)
16+
17+
**Mermaid was nominated and won the JS Open Source Awards (2019) in the category "The most exciting use of technology"!!! Thanks to all involved, people committing pull requests, people answering questions and special thanks to Tyler Long who is helping me maintain the project.**
618

719
## New diagrams in 8.4
820

9-
With version 8.4 class diagrams has got some new features, bug fixes and documentation. Another new feature in 8.4 is the new diagram
10-
type, state diagrams.
21+
With version 8.4 class diagrams have got some new features, bug fixes and documentation. Another new feature in 8.4 is the new diagram type, state diagrams.
1122

1223
![Image show the two new diagram types](./img/new-diagrams.png)
1324

14-
1525
## Special note regarding version 8.2
1626

1727
In version 8.2 a security improvement was introduced. A securityLevel configuration was introduced which sets the level of trust to be used on the parsed diagrams.
1828

19-
* **true**: (default) tags in text are encoded, click functionality is disabled
20-
* false: tags in text are allowed, click functionality is enabled
29+
- **true**: (default) tags in text are encoded, click functionality is disabled
30+
- false: tags in text are allowed, click functionality is enabled
2131

2232
Closed issues:
2333

@@ -26,22 +36,14 @@ Closed issues:
2636
If your application is taking resposibility for the diagram source security you can set the securityLevel accordingly. By doing this clicks and tags are again allowed.
2737

2838
```javascript
29-
mermaidAPI.initialize({
30-
securityLevel: 'loose'
31-
});
39+
mermaidAPI.initialize({
40+
securityLevel: 'loose'
41+
});
3242
```
3343

3444
**🖖 Keep a steady pulse: mermaid needs more Collaborators [#866](https://github.com/knsv/mermaid/issues/866)**
3545

36-
![banner](./img/header.png)
37-
38-
Generation of diagrams and flowcharts from text in a similar manner as markdown.
39-
40-
Ever wanted to simplify documentation and avoid heavy tools like Visio when explaining your code?
41-
42-
This is why mermaid was born, a simple markdown-like script language for generating charts from text via javascript.
43-
44-
**Mermaid was nominated and won the JS Open Source Awards (2019) in the category "The most exciting use of technology"!!! Thanks to all involved, people committing pull requests, people answering questions and special thanks to Tyler Long who is helping me maintain the project.**
46+
## Diagrams
4547

4648
### Flowchart
4749

@@ -52,8 +54,8 @@ graph TD;
5254
B-->D;
5355
C-->D;
5456
```
55-
![Flowchart](./img/flow.png)
5657

58+
![Flowchart](./img/flow.png)
5759

5860
### Sequence diagram
5961

@@ -70,8 +72,8 @@ sequenceDiagram
7072
John->>Bob: How about you?
7173
Bob-->>John: Jolly good!
7274
```
73-
![Sequence diagram](./img/sequence.png)
7475

76+
![Sequence diagram](./img/sequence.png)
7577

7678
### Gantt diagram
7779

@@ -87,8 +89,8 @@ Active task :active, des2, 2014-01-09, 3d
8789
Future task : des3, after des2, 5d
8890
Future task2 : des4, after des3, 5d
8991
```
90-
![Gantt diagram](./img/gantt.png)
9192

93+
![Gantt diagram](./img/gantt.png)
9294

9395
### Class diagram - :exclamation: experimental
9496

@@ -108,8 +110,8 @@ Class01 : int chimp
108110
Class01 : int gorilla
109111
Class08 <--> C2: Cool label
110112
```
111-
![Class diagram](./img/class.png)
112113

114+
![Class diagram](./img/class.png)
113115

114116
### Git graph - :exclamation: experimental
115117

@@ -135,7 +137,6 @@ merge newbranch
135137

136138
![Git graph](./img/git.png)
137139

138-
139140
## Installation
140141

141142
### CDN
@@ -154,21 +155,18 @@ Example: https://unpkg.com/[email protected]/dist/
154155
yarn add mermaid
155156
```
156157

157-
158158
## Documentation
159159

160160
https://mermaidjs.github.io
161161

162-
163162
## Sibling projects
164163

165164
- [mermaid CLI](https://github.com/mermaidjs/mermaid.cli)
166165
- [mermaid live editor](https://github.com/mermaidjs/mermaid-live-editor)
167166
- [mermaid webpack demo](https://github.com/mermaidjs/mermaid-webpack-demo)
168167
- [mermaid Parcel demo](https://github.com/mermaidjs/mermaid-parcel-demo)
169168

170-
171-
# Request for assistance
169+
## Request for assistance
172170

173171
Things are piling up and I have a hard time keeping up. To remedy this
174172
it would be great if we could form a core team of developers to cooperate
@@ -178,61 +176,62 @@ As part of this team you would get write access to the repository and would
178176
represent the project when answering questions and issues.
179177

180178
Together we could continue the work with things like:
181-
* adding more types of diagrams like mindmaps, ert diagrams, etc.
182-
* improving existing diagrams
183179

184-
Don't hesitate to contact me if you want to get involved.
180+
- Adding more types of diagrams like mindmaps, ert diagrams, etc.
181+
- Improving existing diagrams
185182

183+
Don't hesitate to contact me if you want to get involved.
186184

187-
# For contributors
188-
189-
## Setup
190-
191-
yarn install
185+
## For contributors
192186

187+
### Setup
193188

194-
## Build
189+
```
190+
yarn install
191+
```
195192

196-
yarn build:watch
193+
### Build
197194

195+
```
196+
yarn build:watch
197+
```
198198

199-
## Lint
199+
### Lint
200200

201-
yarn lint
201+
```
202+
yarn lint
203+
```
202204

203205
We use [eslint](https://eslint.org/).
204206
We recommend you installing [editor plugins](https://eslint.org/docs/user-guide/integrations) so you can get real time lint result.
205207

208+
### Test
206209

210+
```
211+
yarn test
212+
```
213+
Manual test in browser: open `dist/index.html`
207214

208-
## Test
209-
210-
yarn test
211-
212-
Manual test in browser:
213-
214-
open dist/index.html
215-
216-
217-
## Release
215+
### Release
218216

219217
For those who have the permission to do so:
220218

221219
Update version number in `package.json`.
222220

223-
npm publish
221+
```
222+
npm publish
223+
```
224224

225225
Command above generates files into the `dist` folder and publishes them to npmjs.org.
226226

227-
228-
# Credits
227+
## Credits
229228

230229
Many thanks to the [d3](http://d3js.org/) and [dagre-d3](https://github.com/cpettitt/dagre-d3) projects for providing the graphical layout and drawing libraries!
231230

232231
Thanks also to the [js-sequence-diagram](http://bramp.github.io/js-sequence-diagrams) project for usage of the grammar for the sequence diagrams. Thanks to Jessica Peter for inspiration and starting point for gantt rendering.
233232

234-
*Mermaid was created by Knut Sveidqvist for easier documentation.*
233+
_Mermaid was created by Knut Sveidqvist for easier documentation._
235234

236-
*[Tyler Long](https://github.com/tylerlong) has became a collaborator since April 2017.*
235+
_[Tyler Long](https://github.com/tylerlong) has became a collaborator since April 2017._
237236

238237
Here is the full list of the projects [contributors](https://github.com/knsv/mermaid/graphs/contributors).

0 commit comments

Comments
 (0)