Skip to content

Commit

Permalink
fix(wx): add browser object via webextension-polyfill
Browse files Browse the repository at this point in the history
Boilerplate for #218
  • Loading branch information
lidel committed May 24, 2017
1 parent a3650cd commit cb6d239
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions add-on/src/background/background.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<script src="../lib/npm/is-ipfs.min.js"></script>
<script src="../lib/npm/ipfs-api.min.js"></script>
<script src="../lib/npm/lru.js"></script>
<script src="../lib/npm/browser-polyfill.min.js"></script>
<script src="../lib/option-defaults.js"></script>
<script src="../lib/common.js"></script>
<script src="background.js"></script>
1 change: 1 addition & 0 deletions add-on/src/options/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
</fieldset>
</form>

<script src="../lib/npm/browser-polyfill.min.js"></script>
<script src="../lib/option-defaults.js"></script>
<script src="../lib/data-i18n.js"></script>
<script src="options.js"></script>
Expand Down
1 change: 1 addition & 0 deletions add-on/src/popup/browser-action.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
</div>
</div>

<script src="../lib/npm/browser-polyfill.min.js"></script>
<script src="../lib/data-i18n.js"></script>
<script src="browser-action.js"></script>
</body>
Expand Down
1 change: 1 addition & 0 deletions add-on/src/popup/quick-upload.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<span id="quickUploadMessage" data-i18n="panel_quickUpload"></span><br>
<input type="file" id="quickUploadInput" />
</p>
<script src="../lib/npm/browser-polyfill.min.js"></script>
<script src="../lib/data-i18n.js"></script>
<script src="../lib/npm/ipfs-api.min.js"></script>
<script src="quick-upload.js"></script>
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"build:copy-is-ipfs-lib": "shx cp node_modules/is-ipfs/dist/index.min.js add-on/src/lib/npm/is-ipfs.min.js",
"build:copy-ipfs-api-lib": "shx cp node_modules/ipfs-api/dist/index.min.js add-on/src/lib/npm/ipfs-api.min.js",
"build:copy-lru-map-lib": "shx cp node_modules/lru_map/lru.js add-on/src/lib/npm/lru.js",
"build:copy-wx-polyfill-lib": "shx cp node_modules/webextension-polyfill/dist/browser-polyfill.min.js add-on/src/lib/npm/browser-polyfill.min.js",
"build:bundle-extension": "web-ext build -s add-on/ -a build/",
"test": "run-s test:*",
"test:unit": "cross-env NODE_ENV=test karma start",
Expand Down Expand Up @@ -63,6 +64,7 @@
"dependencies": {
"ipfs-api": "14.0.1",
"is-ipfs": "0.3.0",
"lru_map": "0.3.3"
"lru_map": "0.3.3",
"webextension-polyfill": "0.1.1"
}
}

0 comments on commit cb6d239

Please sign in to comment.