Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile1
-rw-r--r--html/dochead.html1
-rw-r--r--html/static/toc.js (renamed from html/docfoot-script.html)4
-rwxr-xr-xscripts/doc-build.sh3
4 files changed, 3 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index e9a211ae2..e548fdb56 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,6 @@ markdowns = $(shell find doc -name '*.md' | grep -v 'index') README.md
html_docdeps = html/dochead.html \
html/docfoot.html \
- html/docfoot-script.html \
scripts/doc-build.sh \
package.json
diff --git a/html/dochead.html b/html/dochead.html
index 01f4d2f05..a17bce9e4 100644
--- a/html/dochead.html
+++ b/html/dochead.html
@@ -3,6 +3,7 @@
<title>@NAME@</title>
<meta http-equiv="content-type" value="text/html;utf-8">
<link rel="stylesheet" type="text/css" href="../../static/style.css">
+ <script async=true src="../../static/toc.js"></script>
<body>
<div id="wrapper">
diff --git a/html/docfoot-script.html b/html/static/toc.js
index c0fea672a..2cfebd0aa 100644
--- a/html/docfoot-script.html
+++ b/html/static/toc.js
@@ -1,4 +1,3 @@
-<script>
;(function () {
var wrapper = document.getElementById("wrapper")
var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0)
@@ -27,5 +26,4 @@ toc.innerHTML = els.map(function (el) {
}).join("\n")
toc.id = "toc"
document.body.appendChild(toc)
-})()
-</script>
+})();
diff --git a/scripts/doc-build.sh b/scripts/doc-build.sh
index 4ca97322e..849ffce3f 100755
--- a/scripts/doc-build.sh
+++ b/scripts/doc-build.sh
@@ -73,8 +73,7 @@ case $dest in
else
cat
fi) \
- > $dest \
- && cat html/docfoot-script.html >> $dest
+ > $dest
exit $?
;;
*)