static js include

This commit is contained in:
Shan Carter
2017-01-10 10:15:59 -08:00
parent 460a989897
commit 501e624d74
4 changed files with 10 additions and 1 deletions
+7
View File
@@ -0,0 +1,7 @@
import code from './hover-box.txt';
export default function(dom) {
let s = dom.createElement("script");
s.textContent = code;
dom.querySelector("body").appendChild(s);
}
View File
+2
View File
@@ -10,6 +10,7 @@ import footer from "./components/footer";
import citation from "./components/citation";
import markdown from "./components/markdown";
import code from "./components/code";
import hoverBox from "./components/hover-box";
import generateCrossref from "./components/generate-crossref";
function renderImmediately(dom) {
@@ -28,6 +29,7 @@ function renderOnLoad(dom, data) {
markdown(dom, data);
code(dom, data);
citation(dom, data);
hoverBox(dom, data);
// TODO remove script tag
}
+1 -1
View File
@@ -25,7 +25,7 @@ export default {
browser: true,
}),
string({
include: ["**/*.svg", "**/*.html", "**/*.css", "**/*.base64"]
include: ["**/*.txt", "**/*.svg", "**/*.html", "**/*.css", "**/*.base64"]
}),
buble({
exclude: 'node_modules',