Commit a2d7354f authored by TJ Horner's avatar TJ Horner

add docs

parent f39ab046
{
"source": "./src",
"destination": "./doc"
}
\ No newline at end of file
# launchpad-mk2
A node module for interacting with the Launchpad MK2 and Launchpad Pro. Except that it doesn't really work with the MK2 at the moment. Sorry.
A node module for interacting with the Launchpad Pro.
If you're looking for a module to interact with the original Launchpad or Launchpad S, check [here](https://www.npmjs.com/package/midi-launchpad).
# VERSION 2.0.0 HAS MAJOR BREAKING CHANGES
The entire module has been rewritten to be more modern and use ES6 features. The new API will be documented sometime in the future.
\ No newline at end of file
The entire module has been rewritten to be more modern and use ES6 features.
## Getting Started
Here's an example to get you started:
```js
import Launchpad from "launchpad-mk2"
let myLaunchpad = new Launchpad({
in: 1,
out: 1
})
myLaunchpad.lightAll(3)
```
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<svg xmlns="http://www.w3.org/2000/svg" width="104" height="20">
<script/>
<linearGradient id="a" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
<stop offset="1" stop-opacity=".1"/>
</linearGradient>
<rect rx="3" width="104" height="20" fill="#555"/>
<rect rx="3" x="64" width="40" height="20" fill="#4fc921"/>
<path fill="#4fc921" d="M64 0h4v20h-4z"/>
<rect rx="3" width="104" height="20" fill="url(#a)"/>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="32" y="15" fill="#010101" fill-opacity=".3">document</text>
<text x="32" y="14">document</text>
<text x="84" y="15" fill="#010101" fill-opacity=".3">100%</text>
<text x="84" y="14">100%</text>
</g>
</svg>
This diff is collapsed.
This diff is collapsed.
{
"coverage": "100%",
"expectCount": 21,
"actualCount": 21,
"files": {
"src/helpers/button.js": {
"expectCount": 11,
"actualCount": 11,
"undocumentLines": []
},
"src/index.js": {
"expectCount": 10,
"actualCount": 10,
"undocumentLines": []
}
}
}
\ No newline at end of file
/* Tomorrow Theme */
/* Original theme - https://github.com/chriskempson/tomorrow-theme */
/* Pretty printing styles. Used with prettify.js. */
/* SPAN elements with the classes below are added by prettyprint. */
/* plain text */
.pln {
color: #4d4d4c; }
@media screen {
/* string content */
.str {
color: #718c00; }
/* a keyword */
.kwd {
color: #8959a8; }
/* a comment */
.com {
color: #8e908c; }
/* a type name */
.typ {
color: #4271ae; }
/* a literal value */
.lit {
color: #f5871f; }
/* punctuation */
.pun {
color: #4d4d4c; }
/* lisp open bracket */
.opn {
color: #4d4d4c; }
/* lisp close bracket */
.clo {
color: #4d4d4c; }
/* a markup tag name */
.tag {
color: #c82829; }
/* a markup attribute name */
.atn {
color: #f5871f; }
/* a markup attribute value */
.atv {
color: #3e999f; }
/* a declaration */
.dec {
color: #f5871f; }
/* a variable name */
.var {
color: #c82829; }
/* a function name */
.fun {
color: #4271ae; } }
/* Use higher contrast and text-weight for printable form. */
@media print, projection {
.str {
color: #060; }
.kwd {
color: #006;
font-weight: bold; }
.com {
color: #600;
font-style: italic; }
.typ {
color: #404;
font-weight: bold; }
.lit {
color: #044; }
.pun, .opn, .clo {
color: #440; }
.tag {
color: #006;
font-weight: bold; }
.atn {
color: #404; }
.atv {
color: #060; } }
/* Style */
/*
pre.prettyprint {
background: white;
font-family: Consolas, Monaco, 'Andale Mono', monospace;
font-size: 12px;
line-height: 1.5;
border: 1px solid #ccc;
padding: 10px; }
*/
/* Specify class=linenums on a pre to get line numbering */
ol.linenums {
margin-top: 0;
margin-bottom: 0; }
/* IE indents via margin-left */
li.L0,
li.L1,
li.L2,
li.L3,
li.L4,
li.L5,
li.L6,
li.L7,
li.L8,
li.L9 {
/* */ }
/* Alternate shading for lines */
li.L1,
li.L3,
li.L5,
li.L7,
li.L9 {
/* */ }
This diff is collapsed.
This diff is collapsed.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<base data-ice="baseUrl" href="../../../../">
<title data-ice="title">node-launchpad-mk2/doc/script/inherited-summary.js | API Document</title>
<link type="text/css" rel="stylesheet" href="css/style.css">
<link type="text/css" rel="stylesheet" href="css/prettify-tomorrow.css">
<script src="script/prettify/prettify.js"></script>
<script src="script/manual.js"></script>
</head>
<body class="layout-container" data-ice="rootContainer">
<header>
<a href="./">Home</a>
<a href="identifiers.html">Reference</a>
<a href="source.html">Source</a>
<a data-ice="repoURL" href="https://github.com/tjhorner/node-launchpad-mk2" class="repo-url-github">Repository</a>
<div class="search-box">
<span>
<img src="./image/search.png">
<span class="search-input-edge"></span><input class="search-input"><span class="search-input-edge"></span>
</span>
<ul class="search-result"></ul>
</div>
</header>
<nav class="navigation" data-ice="nav"><div>
<ul>
</ul>
</div>
</nav>
<div class="content" data-ice="content"><h1 data-ice="title">node-launchpad-mk2/doc/script/inherited-summary.js</h1>
<pre class="source-code line-number raw-source-code"><code class="prettyprint linenums" data-ice="content">(function(){
function toggle(ev) {
var button = ev.target;
var parent = ev.target.parentElement;
while(parent) {
if (parent.tagName === &apos;TABLE&apos; &amp;&amp; parent.classList.contains(&apos;summary&apos;)) break;
parent = parent.parentElement;
}
if (!parent) return;
var tbody = parent.querySelector(&apos;tbody&apos;);
if (button.classList.contains(&apos;opened&apos;)) {
button.classList.remove(&apos;opened&apos;);
button.classList.add(&apos;closed&apos;);
tbody.style.display = &apos;none&apos;;
} else {
button.classList.remove(&apos;closed&apos;);
button.classList.add(&apos;opened&apos;);
tbody.style.display = &apos;block&apos;;
}
}
var buttons = document.querySelectorAll(&apos;.inherited-summary thead .toggle&apos;);
for (var i = 0; i &lt; buttons.length; i++) {
buttons[i].addEventListener(&apos;click&apos;, toggle);
}
})();
</code></pre>
</div>
<footer class="footer">
Generated by <a href="https://esdoc.org">ESDoc<span data-ice="esdocVersion">(0.5.2)</span><img src="./image/esdoc-logo-mini-black.png"></a>
</footer>
<script src="script/search_index.js"></script>
<script src="script/search.js"></script>
<script src="script/pretty-print.js"></script>
<script src="script/inherited-summary.js"></script>
<script src="script/test-summary.js"></script>
<script src="script/inner-link.js"></script>
<script src="script/patch-for-local.js"></script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<base data-ice="baseUrl" href="../../../../">
<title data-ice="title">node-launchpad-mk2/doc/script/inner-link.js | API Document</title>
<link type="text/css" rel="stylesheet" href="css/style.css">
<link type="text/css" rel="stylesheet" href="css/prettify-tomorrow.css">
<script src="script/prettify/prettify.js"></script>
<script src="script/manual.js"></script>
</head>
<body class="layout-container" data-ice="rootContainer">
<header>
<a href="./">Home</a>
<a href="identifiers.html">Reference</a>
<a href="source.html">Source</a>
<a data-ice="repoURL" href="https://github.com/tjhorner/node-launchpad-mk2" class="repo-url-github">Repository</a>
<div class="search-box">
<span>
<img src="./image/search.png">
<span class="search-input-edge"></span><input class="search-input"><span class="search-input-edge"></span>
</span>
<ul class="search-result"></ul>
</div>
</header>
<nav class="navigation" data-ice="nav"><div>
<ul>
</ul>
</div>
</nav>
<div class="content" data-ice="content"><h1 data-ice="title">node-launchpad-mk2/doc/script/inner-link.js</h1>
<pre class="source-code line-number raw-source-code"><code class="prettyprint linenums" data-ice="content">// inner link(#foo) can not correctly scroll, because page has fixed header,
// so, I manually scroll.
(function(){
var matched = location.hash.match(/errorLines=([\d,]+)/);
if (matched) return;
function adjust() {
window.scrollBy(0, -55);
var el = document.querySelector(&apos;.inner-link-active&apos;);
if (el) el.classList.remove(&apos;inner-link-active&apos;);
// ``[ ] . &apos; &quot; @`` are not valid in DOM id. so must escape these.
var id = location.hash.replace(/([\[\].&apos;&quot;@$])/g, &apos;\\$1&apos;);
var el = document.querySelector(id);
if (el) el.classList.add(&apos;inner-link-active&apos;);
}
window.addEventListener(&apos;hashchange&apos;, adjust);
if (location.hash) {
setTimeout(adjust, 0);
}
})();
(function(){
var els = document.querySelectorAll(&apos;[href^=&quot;#&quot;]&apos;);
for (var i = 0; i &lt; els.length; i++) {
var el = els[i];
el.href = location.href + el.getAttribute(&apos;href&apos;); // because el.href is absolute path
}
})();
</code></pre>
</div>
<footer class="footer">
Generated by <a href="https://esdoc.org">ESDoc<span data-ice="esdocVersion">(0.5.2)</span><img src="./image/esdoc-logo-mini-black.png"></a>
</footer>
<script src="script/search_index.js"></script>
<script src="script/search.js"></script>
<script src="script/pretty-print.js"></script>
<script src="script/inherited-summary.js"></script>
<script src="script/test-summary.js"></script>
<script src="script/inner-link.js"></script>
<script src="script/patch-for-local.js"></script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<base data-ice="baseUrl" href="../../../../">
<title data-ice="title">node-launchpad-mk2/doc/script/manual.js | API Document</title>
<link type="text/css" rel="stylesheet" href="css/style.css">
<link type="text/css" rel="stylesheet" href="css/prettify-tomorrow.css">
<script src="script/prettify/prettify.js"></script>
<script src="script/manual.js"></script>
</head>
<body class="layout-container" data-ice="rootContainer">
<header>
<a href="./">Home</a>
<a href="identifiers.html">Reference</a>
<a href="source.html">Source</a>
<a data-ice="repoURL" href="https://github.com/tjhorner/node-launchpad-mk2" class="repo-url-github">Repository</a>
<div class="search-box">
<span>
<img src="./image/search.png">
<span class="search-input-edge"></span><input class="search-input"><span class="search-input-edge"></span>
</span>
<ul class="search-result"></ul>
</div>
</header>
<nav class="navigation" data-ice="nav"><div>
<ul>
</ul>
</div>
</nav>
<div class="content" data-ice="content"><h1 data-ice="title">node-launchpad-mk2/doc/script/manual.js</h1>
<pre class="source-code line-number raw-source-code"><code class="prettyprint linenums" data-ice="content">(function(){
var matched = location.pathname.match(/\/(manual\/.*?\/.*\.html)$/);
if (!matched) return;
var currentName = matched[1];
var cssClass = &apos;.navigation .manual-toc li[data-link=&quot;&apos; + currentName + &apos;&quot;]&apos;;
var styleText = cssClass + &apos;{ display: block; }\n&apos;;
var style = document.createElement(&apos;style&apos;);
style.textContent = styleText;
document.querySelector(&apos;head&apos;).appendChild(style);
})();
</code></pre>
</div>
<footer class="footer">
Generated by <a href="https://esdoc.org">ESDoc<span data-ice="esdocVersion">(0.5.2)</span><img src="./image/esdoc-logo-mini-black.png"></a>
</footer>
<script src="script/search_index.js"></script>
<script src="script/search.js"></script>
<script src="script/pretty-print.js"></script>
<script src="script/inherited-summary.js"></script>
<script src="script/test-summary.js"></script>
<script src="script/inner-link.js"></script>
<script src="script/patch-for-local.js"></script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<base data-ice="baseUrl" href="../../../../">
<title data-ice="title">node-launchpad-mk2/doc/script/patch-for-local.js | API Document</title>
<link type="text/css" rel="stylesheet" href="css/style.css">
<link type="text/css" rel="stylesheet" href="css/prettify-tomorrow.css">
<script src="script/prettify/prettify.js"></script>
<script src="script/manual.js"></script>
</head>
<body class="layout-container" data-ice="rootContainer">
<header>
<a href="./">Home</a>
<a href="identifiers.html">Reference</a>
<a href="source.html">Source</a>
<a data-ice="repoURL" href="https://github.com/tjhorner/node-launchpad-mk2" class="repo-url-github">Repository</a>
<div class="search-box">
<span>
<img src="./image/search.png">
<span class="search-input-edge"></span><input class="search-input"><span class="search-input-edge"></span>
</span>
<ul class="search-result"></ul>
</div>
</header>
<nav class="navigation" data-ice="nav"><div>
<ul>
</ul>
</div>
</nav>
<div class="content" data-ice="content"><h1 data-ice="title">node-launchpad-mk2/doc/script/patch-for-local.js</h1>
<pre class="source-code line-number raw-source-code"><code class="prettyprint linenums" data-ice="content">(function(){
if (location.protocol === &apos;file:&apos;) {
var elms = document.querySelectorAll(&apos;a[href=&quot;./&quot;]&apos;);
for (var i = 0; i &lt; elms.length; i++) {
elms[i].href = &apos;./index.html&apos;;
}
}
})();
</code></pre>
</div>
<footer class="footer">
Generated by <a href="https://esdoc.org">ESDoc<span data-ice="esdocVersion">(0.5.2)</span><img src="./image/esdoc-logo-mini-black.png"></a>
</footer>
<script src="script/search_index.js"></script>
<script src="script/search.js"></script>
<script src="script/pretty-print.js"></script>
<script src="script/inherited-summary.js"></script>
<script src="script/test-summary.js"></script>
<script src="script/inner-link.js"></script>
<script src="script/patch-for-local.js"></script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<base data-ice="baseUrl" href="../../../../">
<title data-ice="title">node-launchpad-mk2/doc/script/pretty-print.js | API Document</title>
<link type="text/css" rel="stylesheet" href="css/style.css">
<link type="text/css" rel="stylesheet" href="css/prettify-tomorrow.css">
<script src="script/prettify/prettify.js"></script>
<script src="script/manual.js"></script>
</head>
<body class="layout-container" data-ice="rootContainer">
<header>
<a href="./">Home</a>
<a href="identifiers.html">Reference</a>
<a href="source.html">Source</a>
<a data-ice="repoURL" href="https://github.com/tjhorner/node-launchpad-mk2" class="repo-url-github">Repository</a>
<div class="search-box">
<span>
<img src="./image/search.png">
<span class="search-input-edge"></span><input class="search-input"><span class="search-input-edge"></span>
</span>
<ul class="search-result"></ul>
</div>
</header>
<nav class="navigation" data-ice="nav"><div>
<ul>
</ul>
</div>
</nav>
<div class="content" data-ice="content"><h1 data-ice="title">node-launchpad-mk2/doc/script/pretty-print.js</h1>
<pre class="source-code line-number raw-source-code"><code class="prettyprint linenums" data-ice="content">(function(){
prettyPrint();
var lines = document.querySelectorAll(&apos;.prettyprint.linenums li[class^=&quot;L&quot;]&apos;);
for (var i = 0; i &lt; lines.length; i++) {
lines[i].id = &apos;lineNumber&apos; + (i + 1);
}
var matched = location.hash.match(/errorLines=([\d,]+)/);
if (matched) {
var lines = matched[1].split(&apos;,&apos;);
for (var i = 0; i &lt; lines.length; i++) {
var id = &apos;#lineNumber&apos; + lines[i];
var el = document.querySelector(id);
el.classList.add(&apos;error-line&apos;);
}
return;
}
if (location.hash) {
// ``[ ] . &apos; &quot; @`` are not valid in DOM id. so must escape these.
var id = location.hash.replace(/([\[\].&apos;&quot;@$])/g, &apos;\\$1&apos;);
var line = document.querySelector(id);
if (line) line.classList.add(&apos;active&apos;);
}
})();
</code></pre>
</div>
<footer class="footer">
Generated by <a href="https://esdoc.org">ESDoc<span data-ice="esdocVersion">(0.5.2)</span><img src="./image/esdoc-logo-mini-black.png"></a>
</footer>
<script src="script/search_index.js"></script>
<script src="script/search.js"></script>
<script src="script/pretty-print.js"></script>
<script src="script/inherited-summary.js"></script>
<script src="script/test-summary.js"></script>
<script src="script/inner-link.js"></script>
<script src="script/patch-for-local.js"></script>
</body>
</html>
This diff is collapsed.
This diff is collapsed.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<base data-ice="baseUrl" href="../../../../">
<title data-ice="title">node-launchpad-mk2/doc/script/test-summary.js | API Document</title>
<link type="text/css" rel="stylesheet" href="css/style.css">
<link type="text/css" rel="stylesheet" href="css/prettify-tomorrow.css">
<script src="script/prettify/prettify.js"></script>
<script src="script/manual.js"></script>
</head>
<body class="layout-container" data-ice="rootContainer">
<header>
<a href="./">Home</a>
<a href="identifiers.html">Reference</a>
<a href="source.html">Source</a>
<a data-ice="repoURL" href="https://github.com/tjhorner/node-launchpad-mk2" class="repo-url-github">Repository</a>
<div class="search-box">
<span>
<img src="./image/search.png">
<span class="search-input-edge"></span><input class="search-input"><span class="search-input-edge"></span>
</span>
<ul class="search-result"></ul>
</div>
</header>
<nav class="navigation" data-ice="nav"><div>
<ul>
</ul>
</div>
</nav>
<div class="content" data-ice="content"><h1 data-ice="title">node-launchpad-mk2/doc/script/test-summary.js</h1>
<pre class="source-code line-number raw-source-code"><code class="prettyprint linenums" data-ice="content">(function(){
function toggle(ev) {
var button = ev.target;
var parent = ev.target.parentElement;
while(parent) {
if (parent.tagName === &apos;TR&apos; &amp;&amp; parent.classList.contains(&apos;test-describe&apos;)) break;
parent = parent.parentElement;
}
if (!parent) return;
var direction;
if (button.classList.contains(&apos;opened&apos;)) {
button.classList.remove(&apos;opened&apos;);
button.classList.add(&apos;closed&apos;);
direction = &apos;closed&apos;;
} else {
button.classList.remove(&apos;closed&apos;);
button.classList.add(&apos;opened&apos;);
direction = &apos;opened&apos;;
}
var targetDepth = parseInt(parent.dataset.testDepth, 10) + 1;
var nextElement = parent.nextElementSibling;
while (nextElement) {
var depth = parseInt(nextElement.dataset.testDepth, 10);
if (depth &gt;= targetDepth) {
if (direction === &apos;opened&apos;) {
if (depth === targetDepth) nextElement.style.display = &apos;&apos;;
} else if (direction === &apos;closed&apos;) {
nextElement.style.display = &apos;none&apos;;
var innerButton = nextElement.querySelector(&apos;.toggle&apos;);
if (innerButton &amp;&amp; innerButton.classList.contains(&apos;opened&apos;)) {
innerButton.classList.remove(&apos;opened&apos;);