Skip to content

Commit 48467c1

Browse files
authored
Fix serial button not showing (#45)
1 parent 2a206d7 commit 48467c1

File tree

7 files changed

+40
-17
lines changed

7 files changed

+40
-17
lines changed

script/build

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ cd "$(dirname "$0")/.."
55

66
rm -rf dist
77
cp -r public dist
8-
script/download_js_sdk
8+
script/download_js_ble_sdk
9+
script/download_js_serial_sdk
910

1011
NODE_ENV=production npm exec -- eleventy

script/develop

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ cd "$(dirname "$0")/.."
55

66
rm -rf dist
77
cp -r public dist
8-
script/download_js_sdk
8+
script/download_js_ble_sdk
9+
script/download_js_serial_sdk
910

1011
# Quit all background tasks when script exits
1112
trap "kill 0" EXIT

script/download_js_ble_sdk

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Stop on errors
2+
set -e
3+
4+
cd "$(dirname "$0")/.."
5+
6+
SDK_VER=latest
7+
8+
DOWNLOAD_URL=$(npm view improv-wifi-sdk@$SDK_VER dist.tarball)
9+
10+
rm -rf dist/sdk-ble-js
11+
mkdir -p dist/sdk-ble-js
12+
13+
curl $DOWNLOAD_URL | tar zx -C dist/sdk-ble-js --strip-components 3 package/dist/web

script/download_js_sdk

-13
This file was deleted.

script/download_js_serial_sdk

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Stop on errors
2+
set -e
3+
4+
cd "$(dirname "$0")/.."
5+
6+
SDK_VER=latest
7+
8+
DOWNLOAD_URL=$(npm view improv-wifi-serial-sdk@$SDK_VER dist.tarball)
9+
10+
rm -rf dist/sdk-serial-js
11+
mkdir -p dist/sdk-serial-js
12+
13+
curl $DOWNLOAD_URL | tar zx -C dist/sdk-serial-js --strip-components 3 package/dist/web

src/_includes/base.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@
5151
name="twitter:image"
5252
content="https://www.improv-wifi.com/images/social.png"
5353
/>
54-
<script type="module" src="/sdk-js/launch-button.js"></script>
54+
<script type="module" src="/sdk-ble-js/launch-button.js"></script>
55+
<script type="module" src="/sdk-serial-js/serial-launch-button.js"></script>
5556
</head>
5657
<body>
5758
<div class="container">

src/index.html

+8-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ <h2>
2929
Both protocols can also be used from a browser.
3030
</p>
3131
<div>
32+
<h3>Improv via BLE</h3>
3233
<improv-wifi-launch-button>
3334
<span slot="unsupported">
3435
Your browser is not supported. To try it out, visit this page with Google
@@ -37,8 +38,14 @@ <h2>
3738
>.
3839
</span>
3940
</improv-wifi-launch-button>
41+
<h3>Improv via Serial</h3>
4042
<improv-wifi-serial-launch-button>
41-
<span slot="unsupported"></span>
43+
<span slot="unsupported">
44+
Your browser is not supported. To try it out, visit this page with Google
45+
Chrome or Microsoft Edge<span class="not-supported-i hidden">
46+
(but not on your iOS device)</span
47+
>.
48+
</span>
4249
</improv-wifi-serial-launch-button>
4350
</div>
4451
<p>

0 commit comments

Comments
 (0)