Skip to content

Commit

Permalink
Fix serial button not showing (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
jesserockz authored Oct 16, 2024
1 parent 2a206d7 commit 48467c1
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 17 deletions.
3 changes: 2 additions & 1 deletion script/build
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ cd "$(dirname "$0")/.."

rm -rf dist
cp -r public dist
script/download_js_sdk
script/download_js_ble_sdk
script/download_js_serial_sdk

NODE_ENV=production npm exec -- eleventy
3 changes: 2 additions & 1 deletion script/develop
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ cd "$(dirname "$0")/.."

rm -rf dist
cp -r public dist
script/download_js_sdk
script/download_js_ble_sdk
script/download_js_serial_sdk

# Quit all background tasks when script exits
trap "kill 0" EXIT
Expand Down
13 changes: 13 additions & 0 deletions script/download_js_ble_sdk
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Stop on errors
set -e

cd "$(dirname "$0")/.."

SDK_VER=latest

DOWNLOAD_URL=$(npm view improv-wifi-sdk@$SDK_VER dist.tarball)

rm -rf dist/sdk-ble-js
mkdir -p dist/sdk-ble-js

curl $DOWNLOAD_URL | tar zx -C dist/sdk-ble-js --strip-components 3 package/dist/web
13 changes: 0 additions & 13 deletions script/download_js_sdk

This file was deleted.

13 changes: 13 additions & 0 deletions script/download_js_serial_sdk
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Stop on errors
set -e

cd "$(dirname "$0")/.."

SDK_VER=latest

DOWNLOAD_URL=$(npm view improv-wifi-serial-sdk@$SDK_VER dist.tarball)

rm -rf dist/sdk-serial-js
mkdir -p dist/sdk-serial-js

curl $DOWNLOAD_URL | tar zx -C dist/sdk-serial-js --strip-components 3 package/dist/web
3 changes: 2 additions & 1 deletion src/_includes/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
name="twitter:image"
content="https://www.improv-wifi.com/images/social.png"
/>
<script type="module" src="/sdk-js/launch-button.js"></script>
<script type="module" src="/sdk-ble-js/launch-button.js"></script>
<script type="module" src="/sdk-serial-js/serial-launch-button.js"></script>
</head>
<body>
<div class="container">
Expand Down
9 changes: 8 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ <h2>
Both protocols can also be used from a browser.
</p>
<div>
<h3>Improv via BLE</h3>
<improv-wifi-launch-button>
<span slot="unsupported">
Your browser is not supported. To try it out, visit this page with Google
Expand All @@ -37,8 +38,14 @@ <h2>
>.
</span>
</improv-wifi-launch-button>
<h3>Improv via Serial</h3>
<improv-wifi-serial-launch-button>
<span slot="unsupported"></span>
<span slot="unsupported">
Your browser is not supported. To try it out, visit this page with Google
Chrome or Microsoft Edge<span class="not-supported-i hidden">
(but not on your iOS device)</span
>.
</span>
</improv-wifi-serial-launch-button>
</div>
<p>
Expand Down

0 comments on commit 48467c1

Please sign in to comment.