Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to node 10 #22

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/// <reference path="./typings/globals/node/index.d.ts" />
import {DoorSensorPort} from "./lib/DoorSensorPort";
import {SwitchPort} from "./lib/SwitchPort";
import {GPIOGarageDoorAccessory} from "./lib/GPIOGarageDoorAccessory";
import {DoorStateExtension} from "./lib/DoorStateExtension";

import DoorSensorPort from "./lib/DoorSensorPort";
import SwitchPort from "./lib/SwitchPort";
import GPIOGarageDoorAccessory from "./lib/GPIOGarageDoorAccessory";
import DoorStateExtension from "./lib/DoorStateExtension";
declare var module;

module.exports = function (homebridge) {
var exportTypes = {
Expand Down
2 changes: 1 addition & 1 deletion lib/DoorSensorPort.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {getCurrentDoorState, getTargetDoorState} from "./DoorStateExtension";

var Characteristic;

export default class DoorSensorPort extends GPIOPort {
export class DoorSensorPort extends GPIOPort {
private service: any;
private log: any;
private closedSensorValue;
Expand Down
2 changes: 1 addition & 1 deletion lib/DoorStateExtension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

var Characteristic;

export default class DoorStateExtension {
export class DoorStateExtension {
static init(exportedTypes): void {
Characteristic = exportedTypes.Characteristic;
}
Expand Down
6 changes: 3 additions & 3 deletions lib/GPIOGarageDoorAccessory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import Promise = require("bluebird");
import GPIO = require("onoff");
import {getCurrentDoorStateDescription} from "./DoorStateExtension";
import {changeBase} from "./Runtime";
import DoorSensorPort from "./DoorSensorPort";
import SwitchPort from "./SwitchPort";
import {DoorSensorPort} from "./DoorSensorPort";
import {SwitchPort} from "./SwitchPort";

var Accessory, Service, Characteristic, uuid;

export default class GPIOGarageDoorAccessory {
export class GPIOGarageDoorAccessory {
private log;
private name: string;
private doorSensor: DoorSensorPort;
Expand Down
4 changes: 0 additions & 4 deletions lib/GPIOPort.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
/**
* Created by kraig on 7/2/16.
*/

/// <reference path="../typings/globals/onoff/index.d.ts" />
/// <reference path="../typings/modules/bluebird/index.d.ts" />

import util = require("util");
import Promise = require("bluebird");
import onoff = require("onoff");
Expand Down
4 changes: 2 additions & 2 deletions lib/SwitchPort.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
* Created by kraig on 7/2/16.
*/

import DoorSensorPort from "./DoorSensorPort";
import {DoorSensorPort} from "./DoorSensorPort";
import {GPIOPort, GPIOState} from "./GPIOPort";
import {asDoorState, asOperationState, getCurrentDoorState} from "./DoorStateExtension";

var Characteristic;

export default class SwitchPort extends GPIOPort {
export class SwitchPort extends GPIOPort {
private isOperating: boolean;
private service;
private log;
Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "homebridge-gpio-garagedoor",
"description": "Raspberry Pi GPIO based Garage Door plugin for Homebridge",
"version": "0.2.2",
"version": "0.2.3",
"repository": {
"type": "git",
"url": "git://github.com/kraigm/homebridge-gpio-garagedoor.git"
Expand All @@ -21,13 +21,15 @@
"homebridge": ">=0.2.5"
},
"dependencies": {
"bluebird": "^3.3.4",
"onoff" : "1.1.0"
"bluebird": "^3.5.5",
"onoff": "^4.1.2"
},
"devDependencies": {
"@types/bluebird": "^3.5.27",
"@types/onoff": "^3.2.1",
"typescript": "^1.8"
},
"scripts": {
"prepublish": "node node_modules/typescript/bin/tsc --module commonjs index.ts -t ES5"
"prepublish": "node node_modules/typescript/bin/tsc --module commonjs index.ts -t ES6"
}
}
11 changes: 7 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
"compilerOptions": {
"module": "commonjs",
"moduleResolution": "node",
"target": "es5",
"target": "es6",
"sourceMap": true
},
},
"types":[
"util"
],
"exclude": [
"node_modules"
]
"node_modules"
]
}
9 changes: 0 additions & 9 deletions typings.json

This file was deleted.