mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
Merge remote-tracking branch 'origin/master'
# Conflicts: # dist/mermaid.js
This commit is contained in:
commit
325d0dd075
@ -53,16 +53,24 @@ Fork, then:
|
||||
npm install
|
||||
```
|
||||
|
||||
Then the dependencies will have been installed. You use gulp as build tool.
|
||||
Then the dependencies will have been installed. You use gulp and npm calls as build tools.
|
||||
|
||||
The following targets are probably interesting:
|
||||
|
||||
* jison - compiles the jison grammars to parser files
|
||||
* jasmine - runs the jasmine tests (will trigger the jison target)
|
||||
* dist - complies files to the dist catalog
|
||||
|
||||
for instance:
|
||||
```
|
||||
gulp jasmine
|
||||
gulp jison
|
||||
```
|
||||
To run the tests:
|
||||
```
|
||||
npm run karma
|
||||
```
|
||||
|
||||
To build the /dist directory
|
||||
```
|
||||
npm run dist
|
||||
```
|
||||
|
||||
Thanks, Knut Sveidqvist
|
||||
|
34
dist/mermaid.min.js
vendored
34
dist/mermaid.min.js
vendored
File diff suppressed because one or more lines are too long
1041
dist/mermaid.slim.js
vendored
1041
dist/mermaid.slim.js
vendored
File diff suppressed because it is too large
Load Diff
25
dist/mermaid.slim.min.js
vendored
25
dist/mermaid.slim.min.js
vendored
File diff suppressed because one or more lines are too long
1041
dist/mermaidAPI.js
vendored
1041
dist/mermaidAPI.js
vendored
File diff suppressed because it is too large
Load Diff
30
dist/mermaidAPI.min.js
vendored
30
dist/mermaidAPI.min.js
vendored
File diff suppressed because one or more lines are too long
1041
dist/mermaidAPI.slim.js
vendored
1041
dist/mermaidAPI.slim.js
vendored
File diff suppressed because it is too large
Load Diff
24
dist/mermaidAPI.slim.min.js
vendored
24
dist/mermaidAPI.slim.min.js
vendored
File diff suppressed because one or more lines are too long
13
dist/www/index.html
vendored
13
dist/www/index.html
vendored
@ -136,6 +136,19 @@
|
||||
<p>Many thanks to the <a href="http://d3js.org/">d3</a> and <a href="https://github.com/cpettitt/dagre-d3">dagre-d3</a> projects for providing<br>the graphical layout and drawing libraries! Thanks also to the<br><a href="http://bramp.github.io/js-sequence-diagrams">js-sequence-diagram</a> project for usage of the grammar for the<br>sequence diagrams.</p>
|
||||
<p><em>Mermaid was created by Knut Sveidqvist for easier documentation.</em></p>
|
||||
<p>Knut has not done all work by himself, here is the full list of the projects <a href="https://github.com/knsv/mermaid/graphs/contributors">contributors</a>.</p>
|
||||
<h1 id="downstream-projects">Downstream projects</h1>
|
||||
<p>Mermaid is supported in a number of publishing systems and editors. Please report if a plugin/editor is missing from the list below:</p>
|
||||
<ul>
|
||||
<li>Support in LightPaper 1.2+. <a href="https://github.com/42Squares/LightPaper/blob/master/doc/Adding%20Mermaid%20Diagrams.md">Howto</a>. Discout with code MERMAID_25</li>
|
||||
<li><a href="https://github.com/JozoVilcek/gitbook-plugin-mermaid">gitbook-plugin</a></li>
|
||||
<li>light table</li>
|
||||
<li><a href="https://marketplace.atlassian.com/plugins/org.anvard.atlassian.mermaid-plugin/server/overview">Confluence plugin</a></li>
|
||||
<li><a href="http://nauvalatmaja.com/2015/01/13/rendering-mermaid-in-docpad/">Using mermaid via docpad</a></li>
|
||||
<li><a href="https://rubygems.org/gems/jekyll-mermaid/versions/1.0.0">Using mermaid in Jekyll</a></li>
|
||||
<li><a href="http://mostlyblather.com/blog/2015/05/23/mermaid-jekyll-octopress/">Using mermaid via Octopress</a></li>
|
||||
<li><a href="http://pad.haroopress.com/user.html">Mardown editor Haroopad</a></li>
|
||||
<li><a href="https://atom.io/packages/atom-mermaid">Plugin for atom</a></li>
|
||||
</ul>
|
||||
<h1 id="online-live-editor">Online live editor</h1>
|
||||
<p>An editor is available for creating diagrams. With it you can quickly start writing mermaid diagrams. It is possible to:</p>
|
||||
<ul>
|
||||
|
7651
dist/www/javascripts/lib/mermaid.js
vendored
7651
dist/www/javascripts/lib/mermaid.js
vendored
File diff suppressed because it is too large
Load Diff
@ -71,6 +71,22 @@ sequence diagrams.
|
||||
|
||||
Knut has not done all work by himself, here is the full list of the projects [contributors](https://github.com/knsv/mermaid/graphs/contributors).
|
||||
|
||||
# Downstream projects
|
||||
|
||||
Mermaid is supported in a number of publishing systems and editors. Please report if a plugin/editor is missing from the list below:
|
||||
|
||||
* Support in LightPaper 1.2+. [Howto](https://github.com/42Squares/LightPaper/blob/master/doc/Adding%20Mermaid%20Diagrams.md). Discout with code MERMAID_25
|
||||
* [gitbook-plugin](https://github.com/JozoVilcek/gitbook-plugin-mermaid)
|
||||
* light table
|
||||
* [Confluence plugin](https://marketplace.atlassian.com/plugins/org.anvard.atlassian.mermaid-plugin/server/overview)
|
||||
* [Using mermaid via docpad](http://nauvalatmaja.com/2015/01/13/rendering-mermaid-in-docpad/)
|
||||
* [Using mermaid in Jekyll](https://rubygems.org/gems/jekyll-mermaid/versions/1.0.0)
|
||||
* [Using mermaid via Octopress](http://mostlyblather.com/blog/2015/05/23/mermaid-jekyll-octopress/)
|
||||
* [Mardown editor Haroopad](http://pad.haroopress.com/user.html)
|
||||
* [Plugin for atom](https://atom.io/packages/atom-mermaid)
|
||||
* [Markdown Plus](http://mdp.tylingsoft.com/)
|
||||
* [Vim Plugin](https://github.com/kannokanno/previm)
|
||||
|
||||
# Online live editor
|
||||
|
||||
An editor is available for creating diagrams. With it you can quickly start writing mermaid diagrams. It is possible to:
|
||||
|
@ -182,7 +182,7 @@ function createCheckPhantom(_phantomPath) {
|
||||
}
|
||||
|
||||
// If we have phantompath, see if its version satisfies our requirements
|
||||
exec(phantomPath + ' --version', function(err, stdout, stderr) {
|
||||
exec('"' + phantomPath + '" --version', function(err, stdout, stderr) {
|
||||
if (err) {
|
||||
next(new Error("Could not find phantomjs at the specified path."))
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mermaid",
|
||||
"version": "0.5.7",
|
||||
"version": "0.5.8",
|
||||
"description": "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams and gantt charts.",
|
||||
"main": "src/mermaid.js",
|
||||
"keywords": [
|
||||
|
@ -44,7 +44,7 @@
|
||||
"sequenceDiagram" return 'SD';
|
||||
"," return ',';
|
||||
";" return 'NL';
|
||||
[^\->:\n,;]+ return 'ACTOR';
|
||||
[^\->:\n,;]+ { yytext = yytext.trim(); return 'ACTOR'; }
|
||||
"->>" return 'SOLID_ARROW';
|
||||
"-->>" return 'DOTTED_ARROW';
|
||||
"->" return 'SOLID_OPEN_ARROW';
|
||||
@ -64,7 +64,9 @@
|
||||
%% /* language grammar */
|
||||
|
||||
start
|
||||
: SD document { yy.apply($2);return $2; }
|
||||
: SPACE start
|
||||
| NL start
|
||||
| SD document { yy.apply($2);return $2; }
|
||||
;
|
||||
|
||||
document
|
||||
|
@ -151,8 +151,8 @@ exports.drawLoop = function(elem,bounds,labelText, conf){
|
||||
txt.text = labelText;
|
||||
txt.x = bounds.startx;
|
||||
txt.y = bounds.starty;
|
||||
txt.labelMargin = 1.5 * conf.boxMargin;
|
||||
txt.class = 'labelText';
|
||||
txt.labelMargin = 1.5 * 10; // This is the small box that says "loop"
|
||||
txt.class = 'labelText'; // Its size & position are fixed.
|
||||
txt.fill = 'white';
|
||||
|
||||
exports.drawLabel(g,txt);
|
||||
|
@ -67,8 +67,7 @@ var init = function () {
|
||||
nodes = nodes === undefined ? document.querySelectorAll('.mermaid')
|
||||
: typeof nodes === 'string' ? document.querySelectorAll(nodes)
|
||||
: nodes instanceof Node ? [nodes]
|
||||
/*! Last case - sequence config was passed pick next */
|
||||
: nodes;
|
||||
: nodes; // Last case - sequence config was passed pick next
|
||||
|
||||
var i;
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
B -->C["#9829; ;^; #60;"]
|
||||
</div>
|
||||
<div class="mermaid" id="i211">
|
||||
|
||||
%% Example diagram
|
||||
sequenceDiagram
|
||||
Ali#45;ce->>John: Hello John, how are you? #60;
|
||||
John-->>Alice: Great!#quot;
|
||||
|
Loading…
x
Reference in New Issue
Block a user