Skip to content

Commit

Permalink
Merge pull request #28 from RushikeshPatange/test/smol-toml
Browse files Browse the repository at this point in the history
test of smol-toml with launchpad
  • Loading branch information
RushikeshPatange authored Sep 25, 2023
2 parents 2de46fd + 436557e commit 903d8fa
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/rainmaker_config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ image.esp32-s2 = "esp32s2_rainmaker_fan_merged.bin"
image.esp32-c3 = "esp32c3_rainmaker_fan_merged.bin"
android_app_url = "https://play.google.com/store/apps/details?id=com.espressif.rainmaker"
ios_app_url = "https://apps.apple.com/app/esp-rainmaker/id1497491540"
name = "My name is Rushi"

[RainMaker-GPIO]
chipsets = ["ESP32", "ESP32-S2", "ESP32-C3"]
Expand Down
5 changes: 4 additions & 1 deletion js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ let resizeTimeout = false;

import * as utilities from "./utils.js";
import * as esptooljs from "../node_modules/esptool-js/bundle.js";
import * as smolToml from '../node_modules/smol-toml/dist/index.js';

const ESPLoader = esptooljs.ESPLoader;
const Transport = esptooljs.Transport;

Expand Down Expand Up @@ -91,7 +93,8 @@ async function buildQuickTryUI() {
xhr.send();
xhr.onload = function () {
if (xhr.readyState === 4 && xhr.status === 200) {
config = toml.parse(xhr.responseText);
config = smolToml.parse(xhr.responseText);
console.log(config);
var requestedApp = urlParams.get("app");
if (requestedApp) {
// Filter the supported_apps that start with the app name
Expand Down
15 changes: 15 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"dependencies": {
"crypto-js": "^4.1.1",
"esptool-js": "^0.3.0",
"smol-toml": "^1.1.2",
"toml-js": "^0.0.8",
"xterm": "^4.17.0",
"xterm-addon-fit": "^0.5.0"
Expand Down

0 comments on commit 903d8fa

Please sign in to comment.