From b90c26fe908c126a03b286ed952b719a4624731b Mon Sep 17 00:00:00 2001
From: Yukai Huang
Date: Thu, 13 Oct 2016 08:56:02 +0800
Subject: Config CDN for viz.js
---
public/js/extra.js | 1 +
public/views/foot.ejs | 2 +-
public/views/pretty.ejs | 1 +
public/views/slide.ejs | 1 +
webpackBaseConfig.js | 4 ++++
5 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/public/js/extra.js b/public/js/extra.js
index af43c2b2..1dd86760 100644
--- a/public/js/extra.js
+++ b/public/js/extra.js
@@ -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 {
diff --git a/public/views/foot.ejs b/public/views/foot.ejs
index abf2da12..323d18f3 100644
--- a/public/views/foot.ejs
+++ b/public/views/foot.ejs
@@ -20,7 +20,7 @@
<% } %>
-
+
<%- include build/index-scripts %>
diff --git a/public/views/pretty.ejs b/public/views/pretty.ejs
index 7e617dc5..ecce68d9 100644
--- a/public/views/pretty.ejs
+++ b/public/views/pretty.ejs
@@ -102,6 +102,7 @@
<% } %>
+
<%- include build/pretty-scripts %>
<%- include ga %>
diff --git a/public/views/slide.ejs b/public/views/slide.ejs
index ac34006b..5b24ab4e 100644
--- a/public/views/slide.ejs
+++ b/public/views/slide.ejs
@@ -102,6 +102,7 @@
<% } %>
+
<%- include build/slide-scripts %>