Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernize mermaid #524

Merged
merged 33 commits into from
Apr 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
332ceb0
Replace karma + PhantomJS with karma + Chrome headless
tylerlong Apr 18, 2017
f0dc7f8
Replace phantomjs with phantomjs-prebuilt
tylerlong Apr 18, 2017
0ccc216
Replace karma-browserify with karma-webpack
tylerlong Apr 18, 2017
941a7f9
Get rid of browserify
tylerlong Apr 18, 2017
d5178f6
Remove gulp-uglify
tylerlong Apr 18, 2017
95712ea
Update package.json
tylerlong Apr 19, 2017
7fed3b4
Refactor git graph code
tylerlong Apr 19, 2017
3ebae8f
Use Chrome stable instead of Chrome Canary
tylerlong Apr 21, 2017
a4d0674
Remove jshint because we are using standard style based on ESLint
tylerlong Apr 21, 2017
99de658
Add documentation for contributors
tylerlong Apr 21, 2017
0bd8aab
Add instructions for manual test
tylerlong Apr 21, 2017
acab3a5
Remove css files from dist folder
tylerlong Apr 22, 2017
c52a8fc
Webpack compile less to css
tylerlong Apr 22, 2017
73027d5
yarn dist generates minified css files
tylerlong Apr 22, 2017
1927ed4
Update some config files
tylerlong Apr 22, 2017
7bb988c
Update contributing.md
tylerlong Apr 22, 2017
391149d
Refactor webpack config code
tylerlong Apr 22, 2017
1c7c109
Refactor or remove some file
tylerlong Apr 22, 2017
727f6c0
Format less code
tylerlong Apr 22, 2017
7072979
beautify less code
tylerlong Apr 22, 2017
c56ac30
Fix labelBox style issue
tylerlong Apr 22, 2017
4ba3ff6
Fix class diagram default theme color issue
tylerlong Apr 22, 2017
b4e8cff
Fix git graph default style issue
tylerlong Apr 22, 2017
c63d556
Fix class diagram display issue
tylerlong Apr 22, 2017
97b9edf
Adjust class diagram label size
tylerlong Apr 22, 2017
12af9b0
Fix class diagram css style in other themes
tylerlong Apr 22, 2017
ccec381
Fix neutral theme sequence diagram issue
tylerlong Apr 22, 2017
2134dbb
Fix git graph dark theme text color issue
tylerlong Apr 22, 2017
42846cc
Fix class diagram in dark theme issue
tylerlong Apr 22, 2017
d38b9be
Update todo list
tylerlong Apr 22, 2017
dcffde3
Update travis config
tylerlong Apr 24, 2017
7889e35
Run Chrome with --no-sandbox
tylerlong Apr 24, 2017
5cd8ac1
Try to fix travis chrome headless issue
tylerlong Apr 24, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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