Remove direct dependency on webbluetooth types

This commit is contained in:
Rob Moran
2018-01-10 01:45:00 +00:00
parent 6406c8ba64
commit 8007aeb421
3 changed files with 3 additions and 14 deletions

View File

@@ -22,7 +22,6 @@ var typesDir = "types";
// Browser bundles
var bundleDir = "dist";
var bundleGlobal = "SecureDfu";
var bundleIgnore = "webbluetooth";
var watching = false;
@@ -81,7 +80,6 @@ gulp.task("bundle", ["compile"], () => {
return browserify(nodeDir, {
standalone: bundleGlobal
})
.ignore(bundleIgnore)
.bundle()
.on("error", handleError)
.pipe(source(`${fileName}.js`))

View File

@@ -32,6 +32,7 @@
},
"devDependencies": {
"@types/node": "^8.0.54",
"@types/web-bluetooth": "0.0.4",
"browserify": "^15.0.0",
"crc-32": "^1.0.2",
"del": "^3.0.0",
@@ -47,9 +48,7 @@
"tslint-eslint-rules": "^4.1.1",
"typescript": "^2.6.2",
"vinyl-buffer": "^1.0.1",
"vinyl-source-stream": "^2.0.0"
},
"dependencies": {
"webbluetooth": "^1.0.1"
"vinyl-source-stream": "^2.0.0",
"webbluetooth": "^1.0.2"
}
}

View File

@@ -23,16 +23,8 @@
* SOFTWARE.
*/
import { Bluetooth, BluetoothDevice } from "webbluetooth";
import { BluetoothRemoteGATTCharacteristic } from "webbluetooth";
import { EventDispatcher } from "./dispatcher";
declare global {
interface Navigator {
bluetooth: any;
}
}
const CONTROL_UUID = "8ec90001-f315-4f60-9fb8-838830daea50";
const PACKET_UUID = "8ec90002-f315-4f60-9fb8-838830daea50";
const BUTTON_UUID = "8ec90003-f315-4f60-9fb8-838830daea50";