mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-10-03 14:19:38 +02:00
47
test/usageTests/bowerTest.html
Normal file
47
test/usageTests/bowerTest.html
Normal file
@@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<script src="bower_components/mermaid/dist/mermaid.full.min.js"></script>
|
||||
<script>
|
||||
var mermaid_config = {
|
||||
startOnLoad:true
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
function apa(){
|
||||
console.log('CLICKED');
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
TEST 0.2.16
|
||||
<div class="mermaid">
|
||||
graph TD;
|
||||
sq[Square shape2] --> ci((Circle shape // Начало))
|
||||
</div>
|
||||
<h1>Shapes</h1>
|
||||
<div class="mermaid">
|
||||
info
|
||||
</div>
|
||||
<div class="mermaid">
|
||||
graph LR
|
||||
A[Square Rect] -- Link text --> B((Circle))
|
||||
A --> C(Round Rect)
|
||||
B --> D{Rhombus}
|
||||
C --> D
|
||||
</div>
|
||||
<div class="mermaid">
|
||||
graph TD;
|
||||
sq[Square shape]-->ci((Circle shape));
|
||||
od>Odd shape]---|Two line<br>edge comment|ro;
|
||||
od2>Really long text in an Odd shape]-->od3>Really long text with linebreak<br>in an Odd shape];
|
||||
di{Diamond is <br/> broken}-->ro(Rounded<br>square<br>shape);
|
||||
di-->ro2(Rounded square shape);
|
||||
e((Inner circle URL))-->f(,.?!+-*ز);
|
||||
style e red;
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
6
test/usageTests/browserifyUsage.js
Normal file
6
test/usageTests/browserifyUsage.js
Normal file
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Created by knut on 14-12-02.
|
||||
*/
|
||||
mermaid = require('mermaid');
|
||||
|
||||
console.log('Test page! mermaid version'+mermaid.version());
|
15
test/usageTests/package.json
Normal file
15
test/usageTests/package.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "test",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"gulp": "^3.8.10"
|
||||
},
|
||||
"devDependencies": {},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC"
|
||||
}
|
22
test/usageTests/reqJsApp.js
Normal file
22
test/usageTests/reqJsApp.js
Normal file
@@ -0,0 +1,22 @@
|
||||
require.config({
|
||||
baseUrl: '.',
|
||||
paths: {
|
||||
// the left side is the module ID,
|
||||
// the right side is the path to
|
||||
// the jQuery file, relative to baseUrl.
|
||||
// Also, the path should NOT include
|
||||
// the '.js' file extension. This example
|
||||
// is using jQuery 1.9.0 located at
|
||||
// js/lib/jquery-1.9.0.js, relative to
|
||||
// the HTML page.
|
||||
mermaid: 'bower_components/mermaid/dist/mermaid.full'
|
||||
}
|
||||
});
|
||||
|
||||
// Start the main app logic.
|
||||
requirejs(['simple','mermaid'],
|
||||
function (simple) {
|
||||
//jQuery, canvas and the app/sub module are all
|
||||
//loaded and can be used here now.
|
||||
mermaid.init();
|
||||
});
|
42
test/usageTests/requireTest.html
Normal file
42
test/usageTests/requireTest.html
Normal file
@@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<script data-main="reqJsApp.js" src="bower_components/requirejs/require.js"></script>
|
||||
<script>
|
||||
var mermaid_config = {
|
||||
startOnLoad:true
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
TEST 0.4.1
|
||||
<div class="mermaid">
|
||||
graph TD;
|
||||
sq[Square shape2] --> ci((Circle shape // Начало))
|
||||
</div>
|
||||
<h1>Shapes</h1>
|
||||
<div class="mermaid">
|
||||
info
|
||||
</div>
|
||||
<div class="mermaid">
|
||||
graph LR
|
||||
A[Square Rect] -- Link text --> B((Circle))
|
||||
A --> C(Round Rect)
|
||||
B --> D{Rhombus}
|
||||
C --> D
|
||||
</div>
|
||||
<div class="mermaid">
|
||||
graph TD;
|
||||
sq[Square shape]-->ci((Circle shape));
|
||||
od>Odd shape]---|Two line<br>edge comment|ro;
|
||||
od2>Really long text in an Odd shape]-->od3>Really long text with linebreak<br>in an Odd shape];
|
||||
di{Diamond is <br/> broken}-->ro(Rounded<br>square<br>shape);
|
||||
di-->ro2(Rounded square shape);
|
||||
e((Inner circle URL))-->f(,.?!+-*ز);
|
||||
style e red;
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
9
test/usageTests/simple.js
Normal file
9
test/usageTests/simple.js
Normal file
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* Created by knut on 15-03-07.
|
||||
*/
|
||||
define('simple',function(){
|
||||
var simple = {
|
||||
data:'info'
|
||||
};
|
||||
return simple;
|
||||
});
|
Reference in New Issue
Block a user