Skip to content

Commit bcf4634

Browse files
committed
remove pulse deps
1 parent cbb2502 commit bcf4634

21 files changed

+2447
-2136
lines changed

.husky/pre-commit

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env sh
2+
3+
# only run on added/modified files
4+
git diff --name-only --cached --diff-filter=AM -- "*.js" | \
5+
while read -r file
6+
do
7+
if [ -f "$file" ]; then # don't run on deleted files
8+
npx standard "$file"
9+
fi
10+
done

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
7.0.0
2+
- chore: remove pulse deps
3+
14
6.0.0
25
- removed unused deps: chai, request-promise, request, crc-32
36
- removed bluebird Promise

docs/WS2Manager.html

Lines changed: 336 additions & 307 deletions
Large diffs are not rendered by default.

docs/WSv2.html

Lines changed: 1938 additions & 1663 deletions
Large diffs are not rendered by default.

docs/global.html

Lines changed: 27 additions & 14 deletions
Large diffs are not rendered by default.

docs/index.html

Lines changed: 5 additions & 2 deletions
Large diffs are not rendered by default.

docs/scripts/collapse.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,34 @@
11
function hideAllButCurrent(){
22
//by default all submenut items are hidden
33
//but we need to rehide them for search
4+
document.querySelectorAll("nav > ul").forEach(function(parent) {
5+
if (parent.className.indexOf("collapse_top") !== -1) {
6+
parent.style.display = "none";
7+
}
8+
});
49
document.querySelectorAll("nav > ul > li > ul li").forEach(function(parent) {
510
parent.style.display = "none";
611
});
12+
document.querySelectorAll("nav > h3").forEach(function(section) {
13+
if (section.className.indexOf("collapsed_header") !== -1) {
14+
section.addEventListener("click", function(){
15+
if (section.nextSibling.style.display === "none") {
16+
section.nextSibling.style.display = "block";
17+
} else {
18+
section.nextSibling.style.display = "none";
19+
}
20+
});
21+
}
22+
});
723

824
//only current page (if it exists) should be opened
925
var file = window.location.pathname.split("/").pop().replace(/\.html/, '');
1026
document.querySelectorAll("nav > ul > li > a").forEach(function(parent) {
1127
var href = parent.attributes.href.value.replace(/\.html/, '');
1228
if (file === href) {
29+
if (parent.parentNode.parentNode.className.indexOf("collapse_top") !== -1) {
30+
parent.parentNode.parentNode.style.display = "block";
31+
}
1332
parent.parentNode.querySelectorAll("ul li").forEach(function(elem) {
1433
elem.style.display = "block";
1534
});

docs/scripts/commonNav.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
if (typeof fetch === 'function') {
2+
const init = () => {
3+
if (typeof scrollToNavItem !== 'function') return false
4+
scrollToNavItem()
5+
// hideAllButCurrent not always loaded
6+
if (typeof hideAllButCurrent === 'function') hideAllButCurrent()
7+
return true
8+
}
9+
fetch('./nav.inc.html')
10+
.then(response => response.ok ? response.text() : `${response.url} => ${response.status} ${response.statusText}`)
11+
.then(body => {
12+
document.querySelector('nav').innerHTML += body
13+
// nav.js should be quicker to load than nav.inc.html, a fallback just in case
14+
return init()
15+
})
16+
.then(done => {
17+
if (done) return
18+
let i = 0
19+
;(function waitUntilNavJs () {
20+
if (init()) return
21+
if (i++ < 100) return setTimeout(waitUntilNavJs, 300)
22+
console.error(Error('nav.js not loaded after 30s waiting for it'))
23+
})()
24+
})
25+
.catch(error => console.error(error))
26+
} else {
27+
console.error(Error('Browser too old to display commonNav (remove commonNav docdash option)'))
28+
}

docs/scripts/search.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ document.getElementById("nav-search").addEventListener("keyup", function(event)
3333
document.querySelectorAll("nav > ul > li").forEach(function(elem) {
3434
elem.style.display = "block";
3535
});
36+
document.querySelectorAll("nav > ul").forEach(function(elem) {
37+
elem.style.display = "block";
38+
});
3639
//hide all results
3740
document.querySelectorAll("nav > ul > li > ul li").forEach(function(elem) {
3841
elem.style.display = "none";
@@ -79,5 +82,18 @@ document.getElementById("nav-search").addEventListener("keyup", function(event)
7982
parent.style.display = "none";
8083
}
8184
});
85+
document.querySelectorAll("nav > ul.collapse_top").forEach(function(parent) {
86+
var countVisible = 0;
87+
parent.querySelectorAll("li").forEach(function(elem) {
88+
if (elem.style.display !== "none") {
89+
countVisible++;
90+
}
91+
});
92+
93+
if (countVisible == 0) {
94+
//has no child at all and does not contain text
95+
parent.style.display = "none";
96+
}
97+
});
8298
}
8399
});

docs/styles/jsdoc.css

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,19 @@ h6 {
162162
}
163163

164164

165-
tt, code, kbd, samp {
165+
tt, code, kbd, samp, pre {
166166
font-family: Consolas, Monaco, 'Andale Mono', monospace;
167167
background: #f4f4f4;
168+
}
169+
170+
tt, code, kbd, samp{
168171
padding: 1px 5px;
169172
}
170173

174+
pre {
175+
padding-bottom: 1em;
176+
}
177+
171178
.class-description {
172179
font-size: 130%;
173180
line-height: 140%;
@@ -242,6 +249,10 @@ nav h3 {
242249
color: #000;
243250
}
244251

252+
nav h3.collapsed_header {
253+
cursor: pointer;
254+
}
255+
245256
nav ul {
246257
font-family: 'Lucida Grande', 'Lucida Sans Unicode', arial, sans-serif;
247258
font-size: 100%;
@@ -762,4 +773,4 @@ html[data-search-mode] .level-hide {
762773
font-weight: 300;
763774
font-style: normal;
764775

765-
}
776+
}

0 commit comments

Comments
 (0)