Config CDN for viz.js
This commit is contained in:
parent
dda41c489d
commit
b90c26fe90
5 changed files with 8 additions and 1 deletions
|
@ -306,6 +306,7 @@ function finishView(view) {
|
|||
}
|
||||
});
|
||||
//graphviz
|
||||
var Viz = require("viz.js");
|
||||
var graphvizs = view.find(".graphviz.raw").removeClass("raw");
|
||||
graphvizs.each(function (key, value) {
|
||||
try {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<script src="<%- url %>/vendor/moment/min/moment-with-locales.js" defer></script>
|
||||
<script src="<%- url %>/vendor/mermaid/dist/mermaid.min.js" defer></script>
|
||||
<% } %>
|
||||
<!--codemirror-->
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/viz.js/1.3.0/viz.js" defer></script>
|
||||
<%- include build/index-scripts %>
|
||||
<script src="<%- url %>/js/google-drive-upload.js" defer></script>
|
||||
<script src="<%- url %>/js/google-drive-picker.js" defer></script>
|
||||
|
|
|
@ -102,6 +102,7 @@
|
|||
<script src="<%- url %>/vendor/moment/min/moment-with-locales.js" defer></script>
|
||||
<script src="<%- url %>/vendor/mermaid/dist/mermaid.min.js" defer></script>
|
||||
<% } %>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/viz.js/1.3.0/viz.js" defer></script>
|
||||
<%- include build/pretty-scripts %>
|
||||
<script src="<%- url %>/js/reveal-markdown.js" defer></script>
|
||||
<%- include ga %>
|
||||
|
|
|
@ -102,6 +102,7 @@
|
|||
<script src="<%- url %>/vendor/moment/min/moment-with-locales.js" defer></script>
|
||||
<script src="<%- url %>/vendor/mermaid/dist/mermaid.min.js" defer></script>
|
||||
<% } %>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/viz.js/1.3.0/viz.js" defer></script>
|
||||
<%- include build/slide-scripts %>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -66,6 +66,10 @@ module.exports = {
|
|||
extensions: ["", ".js"]
|
||||
},
|
||||
|
||||
externals: {
|
||||
"viz.js": "Viz"
|
||||
},
|
||||
|
||||
module: {
|
||||
loaders: [{
|
||||
test: /\.json$/,
|
||||
|
|
Loading…
Reference in a new issue