Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix serial button not showing #45

Merged
merged 2 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading