From e20c21ba1a6fd3cd677dc22529771c0e7fc0db9e Mon Sep 17 00:00:00 2001
From: Paulus Schoutsen
Date: Fri, 4 Jun 2021 00:23:03 -0700
Subject: [PATCH] Use NPM package
---
README.md | 10 +-
example.html => index.html | 14 +-
package-lock.json | 17 +
package.json | 7 +-
src/const.ts | 14 +
src/install-button.ts | 2 +-
src/start-flash.ts | 21 +-
src/util.ts | 7 +-
src/vendor/esptool/LICENSE.md | 9 -
src/vendor/esptool/README.md | 4 -
src/vendor/esptool/const.ts | 91 ---
src/vendor/esptool/esp_loader.ts | 835 --------------------------
src/vendor/esptool/index.ts | 23 -
src/vendor/esptool/stubs/esp32.json | 7 -
src/vendor/esptool/stubs/esp32s2.json | 7 -
src/vendor/esptool/stubs/esp8266.json | 7 -
src/vendor/esptool/stubs/index.ts | 42 --
src/vendor/esptool/util.ts | 107 ----
18 files changed, 71 insertions(+), 1153 deletions(-)
rename example.html => index.html (67%)
delete mode 100644 src/vendor/esptool/LICENSE.md
delete mode 100644 src/vendor/esptool/README.md
delete mode 100644 src/vendor/esptool/const.ts
delete mode 100644 src/vendor/esptool/esp_loader.ts
delete mode 100644 src/vendor/esptool/index.ts
delete mode 100644 src/vendor/esptool/stubs/esp32.json
delete mode 100644 src/vendor/esptool/stubs/esp32s2.json
delete mode 100644 src/vendor/esptool/stubs/esp8266.json
delete mode 100644 src/vendor/esptool/stubs/index.ts
delete mode 100644 src/vendor/esptool/util.ts
diff --git a/README.md b/README.md
index c6e8d305..ea13ab8f 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,11 @@
-# ESPHome Web: JavaScript SDK for ESPHome
+# ESP Web Tools
Allow flashing ESPHome or other ESP-based firmwares via the browser. Will automatically detect the board type and select a supported firmware.
```html
-
+>
```
Manifest definition:
@@ -37,10 +37,10 @@ Manifest definition:
Allows for optionally passing an attribute to trigger an erase before installation.
```html
-
+>
```
All attributes can also be set via properties (`manifest`, `eraseFirst`)
diff --git a/example.html b/index.html
similarity index 67%
rename from example.html
rename to index.html
index 710afe45..464017dc 100644
--- a/example.html
+++ b/index.html
@@ -16,14 +16,22 @@
ESPHome Web is a set of tools to allow working with ESP devices in the browser.
- To flash the XX firmware, connect an ESP to your computer and hit the button:
- To flash the ESPHome firmware, connect an ESP to your computer and hit the button:
+
+ >
Note, this only works in desktop Chrome and Edge. Android support has not been implemented yet.
This works by combining Web Serial with a manifest which describes the firmware. It will automatically detect the type of the connected ESP device and find the right firmware files in the manifest.
+