mirror of
https://github.com/thegecko/web-bluetooth-dfu.git
synced 2025-12-14 21:18:13 +08:00
Remove direct dependency on webbluetooth types
This commit is contained in:
@@ -22,7 +22,6 @@ var typesDir = "types";
|
|||||||
// Browser bundles
|
// Browser bundles
|
||||||
var bundleDir = "dist";
|
var bundleDir = "dist";
|
||||||
var bundleGlobal = "SecureDfu";
|
var bundleGlobal = "SecureDfu";
|
||||||
var bundleIgnore = "webbluetooth";
|
|
||||||
|
|
||||||
var watching = false;
|
var watching = false;
|
||||||
|
|
||||||
@@ -81,7 +80,6 @@ gulp.task("bundle", ["compile"], () => {
|
|||||||
return browserify(nodeDir, {
|
return browserify(nodeDir, {
|
||||||
standalone: bundleGlobal
|
standalone: bundleGlobal
|
||||||
})
|
})
|
||||||
.ignore(bundleIgnore)
|
|
||||||
.bundle()
|
.bundle()
|
||||||
.on("error", handleError)
|
.on("error", handleError)
|
||||||
.pipe(source(`${fileName}.js`))
|
.pipe(source(`${fileName}.js`))
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^8.0.54",
|
"@types/node": "^8.0.54",
|
||||||
|
"@types/web-bluetooth": "0.0.4",
|
||||||
"browserify": "^15.0.0",
|
"browserify": "^15.0.0",
|
||||||
"crc-32": "^1.0.2",
|
"crc-32": "^1.0.2",
|
||||||
"del": "^3.0.0",
|
"del": "^3.0.0",
|
||||||
@@ -47,9 +48,7 @@
|
|||||||
"tslint-eslint-rules": "^4.1.1",
|
"tslint-eslint-rules": "^4.1.1",
|
||||||
"typescript": "^2.6.2",
|
"typescript": "^2.6.2",
|
||||||
"vinyl-buffer": "^1.0.1",
|
"vinyl-buffer": "^1.0.1",
|
||||||
"vinyl-source-stream": "^2.0.0"
|
"vinyl-source-stream": "^2.0.0",
|
||||||
},
|
"webbluetooth": "^1.0.2"
|
||||||
"dependencies": {
|
|
||||||
"webbluetooth": "^1.0.1"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,16 +23,8 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Bluetooth, BluetoothDevice } from "webbluetooth";
|
|
||||||
import { BluetoothRemoteGATTCharacteristic } from "webbluetooth";
|
|
||||||
import { EventDispatcher } from "./dispatcher";
|
import { EventDispatcher } from "./dispatcher";
|
||||||
|
|
||||||
declare global {
|
|
||||||
interface Navigator {
|
|
||||||
bluetooth: any;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const CONTROL_UUID = "8ec90001-f315-4f60-9fb8-838830daea50";
|
const CONTROL_UUID = "8ec90001-f315-4f60-9fb8-838830daea50";
|
||||||
const PACKET_UUID = "8ec90002-f315-4f60-9fb8-838830daea50";
|
const PACKET_UUID = "8ec90002-f315-4f60-9fb8-838830daea50";
|
||||||
const BUTTON_UUID = "8ec90003-f315-4f60-9fb8-838830daea50";
|
const BUTTON_UUID = "8ec90003-f315-4f60-9fb8-838830daea50";
|
||||||
|
|||||||
Reference in New Issue
Block a user