Skip to content

Commit

Permalink
Merge pull request #29 from getAlby/browserify
Browse files Browse the repository at this point in the history
browserify
  • Loading branch information
bumi authored Jul 18, 2023
2 parents d16d1c5 + ae2579e commit d88e96e
Show file tree
Hide file tree
Showing 3 changed files with 968 additions and 11 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"prepack": "yarn run build",
"test": "jest",
"clean": "rm -rf dist",
"build": "microbundle",
"build:browser": "cp src/window.js dist && browserify dist/window.js > dist/index.browser.js",
"build": "microbundle && yarn build:browser",
"dev": "microbundle watch"
},
"dependencies": {
Expand All @@ -38,6 +39,7 @@
"@types/jest": "^29.4.0",
"@types/node": "^18.11.0",
"@webbtc/webln-types": "^1.0.11",
"browserify": "^17.0.0",
"express": "^4.18.2",
"jest": "^29.5.0",
"microbundle": "^0.15.1",
Expand Down
3 changes: 3 additions & 0 deletions src/window.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// assign alby-sdk exports to global window object (for index.browser.js)
// @ts-ignore
window["albySDK"] = require('./index.cjs');
Loading

0 comments on commit d88e96e

Please sign in to comment.