Drone now does npm publish
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Nathan Kellenicki 2019-03-20 11:46:04 -07:00
parent d782eadb5b
commit b9ab15a0c9
24 changed files with 55 additions and 60 deletions

View File

@ -11,3 +11,12 @@ pipeline:
image: node:10.15.1
commands:
- npm run all
publish:
image: plugins/npm
settings:
token:
from_secret: NPM_TOKEN
when:
event: [tag]
ref: [refs/tags/v*]

View File

@ -7,13 +7,7 @@
LEGO Powered UP is the successor to Power Functions, the system for adding electronics to LEGO models. Powered UP is a collection of ranges - starting with LEGO WeDo 2.0 released in 2016, LEGO Boost released in 2017, and LEGO Powered UP released in 2018. It also includes the 2018 Duplo App-Controlled Train sets.
Powered UP has a few improvements over Power Functions:
1. The use of Bluetooth Low Energy makes it easy to control from a computer, and even write code for.
2. The ability to use sensors to react to events happening in the real world opens up a whole new world of possibilities.
3. As Powered UP hubs and remotes pair with each other, the system allows for a near unlimited number of independently controlled models in the same room. Power Functions was limited to 8 due to the use of infra-red for communication.
This library allows communication and control of Powered UP devices and peripherals via Javascript, both from Node.js and from the browser using Web Bluetooth.
### Node.js Installation
@ -66,7 +60,7 @@ In addition, the Hubs themselves have certain built-in features which this libra
[Full documentation is available here.](https://nathankellenicki.github.io/node-poweredup/)
### Sample Usage
### Node.js Sample Usage
```javascript
const PoweredUP = require("node-poweredup");

View File

@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>DocStrap Class: BoostMoveHub</title>
<title>node-poweredup Class: BoostMoveHub</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
@ -20,7 +20,7 @@
<div class="navbar navbar-default navbar-fixed-top navbar-inverse">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">DocStrap</a>
<a class="navbar-brand" href="index.html">node-poweredup</a>
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
<span class="icon-bar"></span>
<span class="icon-bar"></span>

View File

@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>DocStrap Class: DuploTrainBase</title>
<title>node-poweredup Class: DuploTrainBase</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
@ -20,7 +20,7 @@
<div class="navbar navbar-default navbar-fixed-top navbar-inverse">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">DocStrap</a>
<a class="navbar-brand" href="index.html">node-poweredup</a>
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
<span class="icon-bar"></span>
<span class="icon-bar"></span>

View File

@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>DocStrap Class: Hub</title>
<title>node-poweredup Class: Hub</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
@ -20,7 +20,7 @@
<div class="navbar navbar-default navbar-fixed-top navbar-inverse">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">DocStrap</a>
<a class="navbar-brand" href="index.html">node-poweredup</a>
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
<span class="icon-bar"></span>
<span class="icon-bar"></span>

View File

@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>DocStrap Class: LPF2Hub</title>
<title>node-poweredup Class: LPF2Hub</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
@ -20,7 +20,7 @@
<div class="navbar navbar-default navbar-fixed-top navbar-inverse">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">DocStrap</a>
<a class="navbar-brand" href="index.html">node-poweredup</a>
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
<span class="icon-bar"></span>
<span class="icon-bar"></span>

View File

@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>DocStrap Class: PUPHub</title>
<title>node-poweredup Class: PUPHub</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
@ -20,7 +20,7 @@
<div class="navbar navbar-default navbar-fixed-top navbar-inverse">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">DocStrap</a>
<a class="navbar-brand" href="index.html">node-poweredup</a>
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
<span class="icon-bar"></span>
<span class="icon-bar"></span>

View File

@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>DocStrap Class: PUPRemote</title>
<title>node-poweredup Class: PUPRemote</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
@ -20,7 +20,7 @@
<div class="navbar navbar-default navbar-fixed-top navbar-inverse">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">DocStrap</a>
<a class="navbar-brand" href="index.html">node-poweredup</a>
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
<span class="icon-bar"></span>
<span class="icon-bar"></span>

View File

@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>DocStrap Class: PoweredUP</title>
<title>node-poweredup Class: PoweredUP</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
@ -20,7 +20,7 @@
<div class="navbar navbar-default navbar-fixed-top navbar-inverse">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">DocStrap</a>
<a class="navbar-brand" href="index.html">node-poweredup</a>
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
<span class="icon-bar"></span>
<span class="icon-bar"></span>

View File

@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>DocStrap Class: WeDo2SmartHub</title>
<title>node-poweredup Class: WeDo2SmartHub</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
@ -20,7 +20,7 @@
<div class="navbar navbar-default navbar-fixed-top navbar-inverse">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">DocStrap</a>
<a class="navbar-brand" href="index.html">node-poweredup</a>
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
<span class="icon-bar"></span>
<span class="icon-bar"></span>

View File

@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>DocStrap Source: boostmovehub.js</title>
<title>node-poweredup Source: boostmovehub.js</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
@ -20,7 +20,7 @@
<div class="navbar navbar-default navbar-fixed-top navbar-inverse">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">DocStrap</a>
<a class="navbar-brand" href="index.html">node-poweredup</a>
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
<span class="icon-bar"></span>
<span class="icon-bar"></span>

View File

@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>DocStrap Classes</title>
<title>node-poweredup Classes</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
@ -20,7 +20,7 @@
<div class="navbar navbar-default navbar-fixed-top navbar-inverse">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">DocStrap</a>
<a class="navbar-brand" href="index.html">node-poweredup</a>
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
<span class="icon-bar"></span>
<span class="icon-bar"></span>

View File

@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>DocStrap Source: consts.js</title>
<title>node-poweredup Source: consts.js</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
@ -20,7 +20,7 @@
<div class="navbar navbar-default navbar-fixed-top navbar-inverse">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">DocStrap</a>
<a class="navbar-brand" href="index.html">node-poweredup</a>
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
<span class="icon-bar"></span>
<span class="icon-bar"></span>

View File

@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>DocStrap Source: duplotrainbase.js</title>
<title>node-poweredup Source: duplotrainbase.js</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
@ -20,7 +20,7 @@
<div class="navbar navbar-default navbar-fixed-top navbar-inverse">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">DocStrap</a>
<a class="navbar-brand" href="index.html">node-poweredup</a>
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
<span class="icon-bar"></span>
<span class="icon-bar"></span>

View File

@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>DocStrap Global</title>
<title>node-poweredup Global</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
@ -20,7 +20,7 @@
<div class="navbar navbar-default navbar-fixed-top navbar-inverse">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">DocStrap</a>
<a class="navbar-brand" href="index.html">node-poweredup</a>
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
<span class="icon-bar"></span>
<span class="icon-bar"></span>

View File

@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>DocStrap Source: hub.js</title>
<title>node-poweredup Source: hub.js</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
@ -20,7 +20,7 @@
<div class="navbar navbar-default navbar-fixed-top navbar-inverse">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">DocStrap</a>
<a class="navbar-brand" href="index.html">node-poweredup</a>
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
<span class="icon-bar"></span>
<span class="icon-bar"></span>

View File

@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>DocStrap Index</title>
<title>node-poweredup Index</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
@ -20,7 +20,7 @@
<div class="navbar navbar-default navbar-fixed-top navbar-inverse">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">DocStrap</a>
<a class="navbar-brand" href="index.html">node-poweredup</a>
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
@ -102,15 +102,7 @@
<section class="readme-section">
<article><p><a href="https://drone.kellenicki.com/nkellenicki/node-poweredup"><img src="https://drone.kellenicki.com/api/badges/nkellenicki/node-poweredup/status.svg" alt="Drone"></a><br><a href="https://www.npmjs.com/package/node-poweredup"><img src="https://img.shields.io/npm/v/node-poweredup.svg?style=flat" alt="NPM Version"></a></p>
<h1><strong>node-poweredup</strong> - A Javascript module to interface with LEGO Powered UP components.</h1><h3>Introduction</h3><p>LEGO Powered UP is the successor to Power Functions, the system for adding electronics to LEGO models. Powered UP is a collection of ranges - starting with LEGO WeDo 2.0 released in 2016, LEGO Boost released in 2017, and LEGO Powered UP released in 2018. It also includes the 2018 Duplo App-Controlled Train sets.</p>
<p>Powered UP has a few improvements over Power Functions:</p>
<ol>
<li><p>The use of Bluetooth Low Energy makes it easy to control from a computer, and even write code for.</p>
</li>
<li><p>The ability to use sensors to react to events happening in the real world opens up a whole new world of possibilities.</p>
</li>
<li><p>As Powered UP hubs and remotes pair with each other, the system allows for a near unlimited number of independently controlled models in the same room. Power Functions was limited to 8 due to the use of infra-red for communication.</p>
</li>
</ol>
<p>This library allows communication and control of Powered UP devices and peripherals via Javascript, both from Node.js and from the browser using Web Bluetooth.</p>
<h3>Node.js Installation</h3><p>Node.js v8.0 required.</p>
<pre class="prettyprint source lang-javascript"><code>npm install node-poweredup --save</code></pre><p>node-poweredup uses the Noble BLE library by Sandeep Mistry. On macOS everything should function out of the box. On Linux and Windows there are <a href="https://github.com/noble/noble#prerequisites">certain dependencies which may need installed first</a>.</p>
<p>Note: node-poweredup has been tested on macOS 10.13 and Debian/Raspbian on the Raspberry Pi 3 Model B.</p>
@ -247,7 +239,7 @@
</li>
</ul>
<h3>Documentation</h3><p><a href="https://nathankellenicki.github.io/node-poweredup/">Full documentation is available here.</a></p>
<h3>Sample Usage</h3><pre class="prettyprint source lang-javascript"><code>const PoweredUP = require(&quot;node-poweredup&quot;);
<h3>Node.js Sample Usage</h3><pre class="prettyprint source lang-javascript"><code>const PoweredUP = require(&quot;node-poweredup&quot;);
const poweredUP = new PoweredUP.PoweredUP();
poweredUP.on(&quot;discover&quot;, async (hub) => { // Wait to discover a Hub

View File

@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>DocStrap Source: lpf2hub.js</title>
<title>node-poweredup Source: lpf2hub.js</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
@ -20,7 +20,7 @@
<div class="navbar navbar-default navbar-fixed-top navbar-inverse">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">DocStrap</a>
<a class="navbar-brand" href="index.html">node-poweredup</a>
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
<span class="icon-bar"></span>
<span class="icon-bar"></span>

View File

@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>DocStrap Source: poweredup-node.js</title>
<title>node-poweredup Source: poweredup-node.js</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
@ -20,7 +20,7 @@
<div class="navbar navbar-default navbar-fixed-top navbar-inverse">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">DocStrap</a>
<a class="navbar-brand" href="index.html">node-poweredup</a>
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
<span class="icon-bar"></span>
<span class="icon-bar"></span>

View File

@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>DocStrap Source: puphub.js</title>
<title>node-poweredup Source: puphub.js</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
@ -20,7 +20,7 @@
<div class="navbar navbar-default navbar-fixed-top navbar-inverse">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">DocStrap</a>
<a class="navbar-brand" href="index.html">node-poweredup</a>
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
<span class="icon-bar"></span>
<span class="icon-bar"></span>

View File

@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>DocStrap Source: pupremote.js</title>
<title>node-poweredup Source: pupremote.js</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
@ -20,7 +20,7 @@
<div class="navbar navbar-default navbar-fixed-top navbar-inverse">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">DocStrap</a>
<a class="navbar-brand" href="index.html">node-poweredup</a>
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
<span class="icon-bar"></span>
<span class="icon-bar"></span>

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>DocStrap Source: wedo2smarthub.js</title>
<title>node-poweredup Source: wedo2smarthub.js</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
@ -20,7 +20,7 @@
<div class="navbar navbar-default navbar-fixed-top navbar-inverse">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">DocStrap</a>
<a class="navbar-brand" href="index.html">node-poweredup</a>
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
<span class="icon-bar"></span>
<span class="icon-bar"></span>

View File

@ -10,7 +10,7 @@
"dateFormat": "ddd MMM Do YYYY",
"outputSourceFiles": true,
"outputSourcePath": true,
"systemName": "DocStrap",
"systemName": "node-poweredup",
"footer": "",
"copyright": "node-poweredup by Nathan Kellenicki licensed under the MIT license.",
"navType": "vertical",