mirror of
https://github.com/thegecko/web-bluetooth-dfu.git
synced 2025-12-14 13:08:14 +08:00
Remove direct dependency on webbluetooth types
This commit is contained in:
@@ -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`))
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user