Skip to content

Commit

Permalink
msg
Browse files Browse the repository at this point in the history
  • Loading branch information
xenron committed Jun 20, 2016
1 parent 98b0703 commit b946bf2
Show file tree
Hide file tree
Showing 343 changed files with 332,728 additions and 0 deletions.
1 change: 1 addition & 0 deletions flowchart.js/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/node_modules/
16 changes: 16 additions & 0 deletions flowchart.js/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"extends": "defaults",

"env": {
"browser": true,
"node": true
},

"globals": {
"$": true
},

"rules": {
"no-console": 0
}
}
3 changes: 3 additions & 0 deletions flowchart.js/.gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "site"]
path = site
url = [email protected]:adrai/flowchart.js.git
116 changes: 116 additions & 0 deletions flowchart.js/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
[![JS.ORG](https://img.shields.io/badge/js.org-flowchart-ffb400.svg?style=flat-square)](http://js.org)

#Example

[example](https://github.com/adrai/flowchart.js/blob/master/example/index.html)

#Requirements
You will need [Raphaël](http://www.raphaeljs.com/)

#Usage

On your page you need to include raphael like so:

```html
<script src="raphael-min.js"></script>
```

or

```node.js
npm install flowchart.js
```

and then

```html
<div id="diagram">Diagram will be placed here</div>
<script src="flowchart.js"></script>
<script>
var diagram = flowchart.parse('st=>start: Start:>http://www.google.com[blank]\n' +
'e=>end:>http://www.google.com\n' +
'op1=>operation: My Operation\n' +
'sub1=>subroutine: My Subroutine\n' +
'cond=>condition: Yes \n' +
'or No?\n:>http://www.google.com' +
'io=>inputoutput|request: catch something...\n' +
'' +
'st->op1->cond\n' +
'cond(yes)->io->e\n' + // conditions can also be redirected like cond(yes, bottom) or cond(yes, right)
'cond(no)->sub1(right)->op1');// the other symbols too...
diagram.drawSVG('diagram');
// you can also try to pass options:
diagram.drawSVG('diagram', {
'x': 0,
'y': 0,
'line-width': 3,
'line-length': 50,
'text-margin': 10,
'font-size': 14,
'font-color': 'black',
'line-color': 'black',
'element-color': 'black',
'fill': 'white',
'yes-text': 'yes',
'no-text': 'no',
'arrow-end': 'block',
'scale': 1,
// style symbol types
'symbols': {
'start': {
'font-color': 'red',
'element-color': 'green',
'fill': 'yellow'
},
'end':{
'class': 'end-element'
}
},
// even flowstate support ;-)
'flowstate' : {
// 'past' : { 'fill' : '#CCCCCC', 'font-size' : 12},
// 'current' : {'fill' : 'yellow', 'font-color' : 'red', 'font-weight' : 'bold'},
// 'future' : { 'fill' : '#FFFF99'},
'request' : { 'fill' : 'blue'}//,
// 'invalid': {'fill' : '#444444'},
// 'approved' : { 'fill' : '#58C4A3', 'font-size' : 12, 'yes-text' : 'APPROVED', 'no-text' : 'n/a' },
// 'rejected' : { 'fill' : '#C45879', 'font-size' : 12, 'yes-text' : 'n/a', 'no-text' : 'REJECTED' }
}
});
</script>
```

#Advice
Symbols that should possibly not be used in the text: '=>' and '->' and ':>' and '|'

#Contributors

via [GitHub](https://github.com/adrai/flowchart.js/graphs/contributors)

#Thanks

Many thanks to [js-sequence-diagrams](http://bramp.github.io/js-sequence-diagrams/) which greatly inspired this project, and forms the basis for the syntax.

#Licence

Copyright (c) 2016 Adriano Raiano

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
15 changes: 15 additions & 0 deletions flowchart.js/bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "flowchart",
"version": "1.6.1",
"main": "./release/flowchart.min.js",
"dependencies": {},
"ignore": [
"src/",
"buildtasks/",
"example/",
".gitignore",
"Gruntfile.js",
"package.json",
"**/*.zip"
]
}
30 changes: 30 additions & 0 deletions flowchart.js/devserver.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
var path = require('path');
var express = require('express');
var webpack = require('webpack');
var config = require('./webpack.config');

var port = 8000;
var app = express();
var compiler = webpack(config);

app.use(express.static(process.cwd()));

app.use(require('webpack-dev-middleware')(compiler, {
noInfo: true,
publicPath: config.output.publicPath
}));

app.use(require('webpack-hot-middleware')(compiler));

app.get('/', function (req, res) {
res.sendFile(path.join(__dirname, 'index.html'));
});

app.listen(port, '0.0.0.0', function (err) {
if (err) {
console.log(err);
return;
}

console.log('Listening at http://0.0.0.0:%s', port);
});
33 changes: 33 additions & 0 deletions flowchart.js/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!doctype html>
<html lang="en">
<head>
<title>Demo page</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
</head>
<body>
<div id="chart">
st=>start: Start|past:>http://www.google.com[blank]
e=>end: End:>http://www.google.com
op1=>operation: My Operation|past
op2=>operation: Stuff|current
sub1=>subroutine: My Subroutine|invalid
cond=>condition: Yes
or No?|approved:>http://www.google.com
c2=>condition: Good idea|rejected
io=>inputoutput: catch something...|request

st->op1(right)->cond
cond(yes, right)->c2
cond(no)->sub1(left)->op1
c2(yes)->io->e
c2(no)->op2->e
</div>
<script src="/node_modules/jquery/dist/jquery.js"></script>
<script src="/build/flowchart.js"></script>
<script>
$('#chart').flowChart();
</script>
</body>
</html>
13 changes: 13 additions & 0 deletions flowchart.js/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
require('./src/flowchart.shim');
var parse = require('./src/flowchart.parse');
require('./src/jquery-plugin');

var FlowChart = {
parse: parse
};

if (typeof window !== 'undefined') {
window.flowchart = FlowChart;
}

module.exports = FlowChart;
19 changes: 19 additions & 0 deletions flowchart.js/license
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2016 Adriano Raiano

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
43 changes: 43 additions & 0 deletions flowchart.js/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"author": "adrai",
"name": "flowchart.js",
"version": "1.6.3",
"main": "./index",
"private": false,
"engines": {
"node": "~v0.4.12"
},
"dependencies": {
"raphael": "git://github.com/DmitryBaranovskiy/raphael.git"
},
"devDependencies": {
"eslint": "^1.10.3",
"eslint-config-defaults": "^8.0.2",
"express": ">= 0.0.1",
"jquery": "^2.2.0",
"lodash": ">=0.2.1",
"moment": "^2.11.1",
"webpack": "^1.12.11",
"webpack-dev-middleware": "^1.4.0",
"webpack-hot-middleware": "^2.6.0"
},
"scripts": {
"start": "node devserver.js",
"lint": "eslint src",
"build:unminified": "NODE_ENV=production webpack -d --config webpack.config.js",
"build:minified": "NODE_ENV=production MINIFIED=1 webpack -d --config webpack.config.js",
"build": "npm run build:unminified && npm run build:minified && cp ./release/flowchart.js ./site/flowchart-latest.js",
"test": "npm run lint"
},
"repository": {
"type": "git",
"url": "https://github.com/adrai/flowchart.js.git"
},
"keywords": [
"flowchart",
"client",
"script"
],
"homepage": "http://flowchart.js.org/",
"license": "MIT"
}
Loading

0 comments on commit b946bf2

Please sign in to comment.