Merge pull request #3 from churchs19/master

Minor refactoring for NPM/TypeScript package compatibility
This commit is contained in:
Nathan Kellenicki 2018-11-15 11:24:24 -08:00 committed by GitHub
commit 6ef5d8b769
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 210 additions and 176 deletions

3
.gitignore vendored
View File

@ -1,3 +1,4 @@
node_modules/ node_modules/
dist/ dist/
.vscode/
*.tgz

View File

@ -0,0 +1,17 @@
boostmovehub.ts
consts.ts
duplotrainbase.ts
hub.ts
index.ts
lpf2hub.ts
port.ts
poweredup.ts
puphub.ts
pupremote.ts
package-lock.json
tsconfig.json
tslint.json
utils.ts
wedo2smarthub.ts
.vscode/
examples/

11
index.ts Normal file
View File

@ -0,0 +1,11 @@
import { BoostMoveHub } from "./boostmovehub";
import * as Consts from "./consts";
import { DuploTrainBase } from "./duplotrainbase";
import { Hub } from "./hub";
import { PoweredUP } from "./poweredup";
import { PUPHub } from "./puphub";
import { PUPRemote } from "./pupremote";
import { WeDo2SmartHub } from "./wedo2smarthub";
export default PoweredUP;
export { PoweredUP, Hub, WeDo2SmartHub, BoostMoveHub, PUPHub, PUPRemote, DuploTrainBase, Consts };

345
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,10 @@
{ {
"name": "node-poweredup", "name": "node-poweredup",
"version": "1.1.6", "version": "1.1.7",
"description": "A Node.js module to interface with LEGO Powered UP components.", "description": "A Node.js module to interface with LEGO Powered UP components.",
"homepage": "https://github.com/nathankellenicki/node-poweredup/", "homepage": "https://github.com/nathankellenicki/node-poweredup/",
"main": "dist/poweredup.js", "main": "dist/index.js",
"types": "dist/poweredup.d.ts", "types": "dist/index.d.ts",
"scripts": { "scripts": {
"build": "tslint -c tslint.json \"*.ts\" && tsc", "build": "tslint -c tslint.json \"*.ts\" && tsc",
"docs": "jsdoc2md dist/poweredup.js dist/lpf2hub.js dist/wedo2smarthub.js dist/boostmovehub.js dist/puphub.js dist/pupremote.js dist/duplotrainbase.js dist/hub.js dist/consts.js > DOCS.md", "docs": "jsdoc2md dist/poweredup.js dist/lpf2hub.js dist/wedo2smarthub.js dist/boostmovehub.js dist/puphub.js dist/pupremote.js dist/duplotrainbase.js dist/hub.js dist/consts.js > DOCS.md",

View File

@ -16,7 +16,6 @@ import { EventEmitter } from "events";
import Debug = require("debug"); import Debug = require("debug");
const debug = Debug("PoweredUP"); const debug = Debug("PoweredUP");
import noble = require("noble-mac"); import noble = require("noble-mac");
import { start } from "repl";
let ready = false; let ready = false;
let wantScan = false; let wantScan = false;
@ -153,6 +152,3 @@ export class PoweredUP extends EventEmitter {
} }
export default PoweredUP;
export { Hub, WeDo2SmartHub, BoostMoveHub, PUPHub, PUPRemote, Consts };