Skip to content

Commit

Permalink
Merge pull request #524 from tylingsoft/master
Browse files Browse the repository at this point in the history
Modernize mermaid
  • Loading branch information
tylerlong authored Apr 24, 2017
2 parents 189758c + 5cd8ac1 commit 1a3d37d
Show file tree
Hide file tree
Showing 58 changed files with 1,761 additions and 2,935 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
node_modules
#dist
bower_components

*.sublime-project
Expand All @@ -13,3 +12,4 @@ test/tmp_*
test/fixtures/samples/*.actual*

dist/*.js
dist/*.css
32 changes: 17 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
language: node_js
osx_image: xcode8.1
os:
- linux
- osx
sudo: false
node_js:
- "6.9"
- "7.9"
env:
- CXX=g++-4.8
sudo: required
dist: xenial
addons:
code_climate:
repo_token: e87e6bf1c253e0555437ebd23235fdfe2749b889358e7c6d100e4ea5b4f2e091
apt:
sources:
- ubuntu-toolchain-r-test
- google-chrome
packages:
- g++-4.8
- google-chrome-stable
code_climate:
repo_token: e87e6bf1c253e0555437ebd23235fdfe2749b889358e7c6d100e4ea5b4f2e091
language: node_js
node_js:
- "6"
- "7"
before_install:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
before_script:
- yarn build
script:
- yarn test
after_script:
- cat coverage/lcov.info | codeclimate
22 changes: 17 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Some important guidlines:

The issue list and the items marked with **help wanted** is a good starting point if you want to do some work.


## Guidelines for avoiding duplicate work

Contributing is great. It is not so fun when you are done with your issue and just before you're about to push your
Expand All @@ -26,6 +27,7 @@ place to prevent this:


## Submitting changes

Please send a GitHub Pull Request with a clear list of what you've done (read more about pull requests). When you send
a pull request, we will love you forever if you include jasmine tests. We can always use more test coverage.

Expand All @@ -47,6 +49,7 @@ Also for the CDN, always use cwd-relative paths rather than root-relative paths
url('/images/blah.gif'), use url('../images/blah.gif').

# Build instructions

Fork, then:

```
Expand All @@ -63,14 +66,23 @@ for instance:
```
gulp jison
```
To run the tests:

To build:

```
yarn run karma
yarn build
```

To build the /dist directory
To run the tests:

```
yarn run dist
yarn test
```

Thanks, Knut Sveidqvist
Make sure you have Chrome browser installed. We use Chrome headless for testing.

Manual test:

```
open dist/demo/index.html
```
61 changes: 55 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mermaid [![Build Status](https://travis-ci.org/knsv/mermaid.svg?branch=master)](https://travis-ci.org/knsv/mermaid) [![Code Climate](https://codeclimate.com/github/knsv/mermaid/badges/gpa.svg)](https://codeclimate.com/github/knsv/mermaid)
=======
# mermaid [![Build Status](https://travis-ci.org/knsv/mermaid.svg?branch=master)](https://travis-ci.org/knsv/mermaid)

[![Code Climate](https://codeclimate.com/github/knsv/mermaid/badges/gpa.svg)](https://codeclimate.com/github/knsv/mermaid)
[![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)

Generation of diagrams and flowcharts from text in a similar manner as markdown.
Expand Down Expand Up @@ -108,6 +108,7 @@ end

</table>


## Further reading

* [Usage](http://knsv.github.io/mermaid/#usage)
Expand All @@ -116,6 +117,7 @@ end
* [Mermaid client](http://knsv.github.io/mermaid/#mermaid-cli)
* [Demos](http://knsv.github.io/mermaid/#demos)


# Request for assistance

Things are piling up and I have hard time keeping up. To remedy this
Expand All @@ -134,11 +136,58 @@ Together we could continue the work with things like:

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


# For contributors

## Setup

Make sure you have Chrome browser installed, this project uses Chrome headless to running tests.

yarn install


## Build

yarn build

If you want real time incremental build:

yarn watch


## Lint

yarn lint

We use [JavaScript Standard Style](https://github.com/feross/standard).
We recommend you installing [editor plugins](https://github.com/feross/standard#are-there-text-editor-plugins) so you can get real time lint result.


## Test

yarn test

Manual test in browser:

open dist/demo/index.html

Manual test in Node.js:

node dist/demo/index.js


## Distribtion

yarn dist

Command above generates files into the `dist` folder, then you can publish them to npmjs.org.


# Credits
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! 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.

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!

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.

*Mermaid was created by Knut Sveidqvist for easier documentation.*

Expand Down
6 changes: 4 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@
"authors": [
"knsv <[email protected]>"
],
"description": "Markdownish syntax for generating flowcharts, sequence diagrams and gantt charts.",
"description": "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",
"main": "dist/mermaid.slim.js",
"keywords": [
"diagram",
"markdown",
"flowchart",
"sequence diagram",
"gantt"
"gantt",
"class diagram",
"git graph"
],
"license": "MIT",
"ignore": [
Expand Down
7 changes: 3 additions & 4 deletions dist/demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Mermaid Quick Test Page</title>
<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgo=">
<link rel="stylesheet" href="../mermaid.forest.css">
<link rel="stylesheet" href="../mermaid.css">
</head>
<body>
<div class="mermaid">
Expand Down Expand Up @@ -65,9 +65,8 @@
gitGraph :
options
{
"key": "value",
"nodeWidth": 150,
"nodeSpacing" : 150
"nodeSpacing" : 150,
"nodeRadius": 10
}
end
commit
Expand Down
Loading

0 comments on commit 1a3d37d

Please sign in to comment.