From e5db2782831ef3b3cba934c94016097903260a37 Mon Sep 17 00:00:00 2001 From: ronreg-ribdev Date: Sat, 2 Jan 2021 23:16:22 -0800 Subject: [PATCH] Switch over to parcel-based build flow --- extension/package.json | 3 ++- extension/{ => src}/background/main.js | 0 extension/{ => src}/background/page.html | 0 extension/{ => src}/icons/urbit-icon.png | Bin extension/{ => src}/manifest.json | 0 extension/{ => src}/options/browser-polyfill.min.js | 0 extension/{ => src}/options/options.html | 0 extension/{ => src}/options/options.js | 2 ++ extension/{ => src}/popup/browser-polyfill.min.js | 0 extension/{ => src}/popup/popup.css | 0 extension/{ => src}/popup/popup.html | 1 - extension/{ => src}/popup/popup.js | 2 ++ extension/yarn.lock | 5 +++++ 13 files changed, 11 insertions(+), 2 deletions(-) rename extension/{ => src}/background/main.js (100%) rename extension/{ => src}/background/page.html (100%) rename extension/{ => src}/icons/urbit-icon.png (100%) rename extension/{ => src}/manifest.json (100%) rename extension/{ => src}/options/browser-polyfill.min.js (100%) rename extension/{ => src}/options/options.html (100%) rename extension/{ => src}/options/options.js (94%) rename extension/{ => src}/popup/browser-polyfill.min.js (100%) rename extension/{ => src}/popup/popup.css (100%) rename extension/{ => src}/popup/popup.html (87%) rename extension/{ => src}/popup/popup.js (91%) diff --git a/extension/package.json b/extension/package.json index e60d454..a9fe0e6 100644 --- a/extension/package.json +++ b/extension/package.json @@ -1,7 +1,8 @@ { "dependencies": { "react": "^17.0.1", - "react-dom": "^17.0.1" + "react-dom": "^17.0.1", + "webextension-polyfill": "^0.7.0" }, "name": "urbit-browser-manager-extension", "version": "0.0.1", diff --git a/extension/background/main.js b/extension/src/background/main.js similarity index 100% rename from extension/background/main.js rename to extension/src/background/main.js diff --git a/extension/background/page.html b/extension/src/background/page.html similarity index 100% rename from extension/background/page.html rename to extension/src/background/page.html diff --git a/extension/icons/urbit-icon.png b/extension/src/icons/urbit-icon.png similarity index 100% rename from extension/icons/urbit-icon.png rename to extension/src/icons/urbit-icon.png diff --git a/extension/manifest.json b/extension/src/manifest.json similarity index 100% rename from extension/manifest.json rename to extension/src/manifest.json diff --git a/extension/options/browser-polyfill.min.js b/extension/src/options/browser-polyfill.min.js similarity index 100% rename from extension/options/browser-polyfill.min.js rename to extension/src/options/browser-polyfill.min.js diff --git a/extension/options/options.html b/extension/src/options/options.html similarity index 100% rename from extension/options/options.html rename to extension/src/options/options.html diff --git a/extension/options/options.js b/extension/src/options/options.js similarity index 94% rename from extension/options/options.js rename to extension/src/options/options.js index 159170e..47795d0 100644 --- a/extension/options/options.js +++ b/extension/src/options/options.js @@ -1,3 +1,5 @@ +const browser = require("webextension-polyfill"); + const urbitIdSelector = document.querySelector("#urbitId"); const urbitCodeSelector = document.querySelector("#urbitCode"); diff --git a/extension/popup/browser-polyfill.min.js b/extension/src/popup/browser-polyfill.min.js similarity index 100% rename from extension/popup/browser-polyfill.min.js rename to extension/src/popup/browser-polyfill.min.js diff --git a/extension/popup/popup.css b/extension/src/popup/popup.css similarity index 100% rename from extension/popup/popup.css rename to extension/src/popup/popup.css diff --git a/extension/popup/popup.html b/extension/src/popup/popup.html similarity index 87% rename from extension/popup/popup.html rename to extension/src/popup/popup.html index 62b3107..2e9c6ea 100644 --- a/extension/popup/popup.html +++ b/extension/src/popup/popup.html @@ -12,7 +12,6 @@ - diff --git a/extension/popup/popup.js b/extension/src/popup/popup.js similarity index 91% rename from extension/popup/popup.js rename to extension/src/popup/popup.js index e214664..e115e98 100644 --- a/extension/popup/popup.js +++ b/extension/src/popup/popup.js @@ -1,3 +1,5 @@ +const browser = require("webextension-polyfill"); + console.log("popup.js running"); const getLocalStorage = browser.storage.sync.get(); diff --git a/extension/yarn.lock b/extension/yarn.lock index 174ddc2..e9c001f 100644 --- a/extension/yarn.lock +++ b/extension/yarn.lock @@ -5120,6 +5120,11 @@ wcwidth@^1.0.1: dependencies: defaults "^1.0.3" +webextension-polyfill@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/webextension-polyfill/-/webextension-polyfill-0.7.0.tgz#0df1120ff0266056319ce1a622b09ad8d4a56505" + integrity sha512-su48BkMLxqzTTvPSE1eWxKToPS2Tv5DLGxKexLEVpwFd6Po6N8hhSLIvG6acPAg7qERoEaDL+Y5HQJeJeml5Aw== + webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad"