Do I then just do an import ‘sequence-diagram-min.js’;?
So this basically means I load all the vars and functions from the external lib, and they don’t use the Module pattern? So in this way I can’t separate between private and public functions? (and because it is not a module, I don’t explicitly mentoin the default exports or vars because there are none. So importing in this way is the same as doing <script src="sequence-diagram-min.js"></script> in an HTML for non meteor people.
js-sequence-diagrams depends on Raphaël and Underscore.js (we are lodash compatible). You can download all these files manually, or use “bower install bramp/js-sequence-diagrams”.
Then include the following HTML:
<script src="raphael-min.js"></script>
<script src="underscore-min.js"></script>
<script src="sequence-diagram-min.js"></script>
and now you have two options. You can manually parse the text:
<div id="diagram"></div>
<script>
var diagram = Diagram.parse("A->B: Message");
diagram.drawSVG("diagram", {theme: 'hand'});
</script>
or use jQuery to do all the work:
<div class="diagram">A->B: Message</div>
<script>
$(".diagram").sequenceDiagram({theme: 'hand'});
</script>