diagram-2020 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/diagram.txt +1 -1
- package/index.html +10 -2
- package/package.json +1 -1
- package/server.js +8 -0
package/diagram.txt
CHANGED
package/index.html
CHANGED
|
@@ -5,8 +5,16 @@
|
|
|
5
5
|
<title>Mermaid Preview</title>
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
7
7
|
<script src="./mermaid.min.js"></script>
|
|
8
|
+
<!--
|
|
8
9
|
<script src="http://localhost:35730/livereload.js"></script>
|
|
10
|
+
-->
|
|
9
11
|
<script>
|
|
12
|
+
const lrPort = 35730;
|
|
13
|
+
const host = location.hostname;
|
|
14
|
+
const script = document.createElement("script");
|
|
15
|
+
script.src = 'http://' + host + ':' + lrPort + '/livereload.js';
|
|
16
|
+
document.head.appendChild(script);
|
|
17
|
+
|
|
10
18
|
mermaid.initialize({ startOnLoad: true });
|
|
11
19
|
</script>
|
|
12
20
|
</head>
|
|
@@ -25,12 +33,12 @@ state pegawai {
|
|
|
25
33
|
}
|
|
26
34
|
state hrd {
|
|
27
35
|
hrd_senang: senang
|
|
28
|
-
|
|
36
|
+
hrd_tidakSenangHahaha: tidak senang hahaha
|
|
29
37
|
}
|
|
30
38
|
jam_delapan --> pegawai_datang
|
|
31
39
|
pegawai_datang --> hrd_senang
|
|
32
40
|
jam_delapan --> pegawai_tidakDatang
|
|
33
|
-
pegawai_tidakDatang -->
|
|
41
|
+
pegawai_tidakDatang --> hrd_tidakSenangHahaha
|
|
34
42
|
</div>
|
|
35
43
|
</body>
|
|
36
44
|
</html>
|
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -150,8 +150,16 @@ function generateHTML(lrPort) {
|
|
|
150
150
|
<title>Mermaid Preview</title>
|
|
151
151
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
152
152
|
<script src="./mermaid.min.js"></script>
|
|
153
|
+
<!--
|
|
153
154
|
<script src="http://localhost:${lrPort}/livereload.js"></script>
|
|
155
|
+
-->
|
|
154
156
|
<script>
|
|
157
|
+
const lrPort = ${lrPort};
|
|
158
|
+
const host = location.hostname;
|
|
159
|
+
const script = document.createElement("script");
|
|
160
|
+
script.src = 'http://' + host + ':' + lrPort + '/livereload.js';
|
|
161
|
+
document.head.appendChild(script);
|
|
162
|
+
|
|
155
163
|
mermaid.initialize({ startOnLoad: true });
|
|
156
164
|
</script>
|
|
157
165
|
</head>
|