FIX: change build script to enable standalone
This commit is contained in:
parent
f39361263a
commit
5003538319
7
dist/mempool.js
vendored
7
dist/mempool.js
vendored
@ -653,6 +653,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var browserWS = function (options, defaultWs, websocketEndpoint) {
|
||||
var ws = new WebSocket(websocketEndpoint || defaultWs);
|
||||
ws.addEventListener('open', function open() {
|
||||
handleMessage(ws, options);
|
||||
});
|
||||
return ws;
|
||||
};
|
||||
var handleMessage = function (ws, options) {
|
||||
ws.send(JSON.stringify({ action: 'init' }));
|
||||
setInterval(function timeout() {
|
||||
ws.send(JSON.stringify({
|
||||
@ -660,8 +665,6 @@ var browserWS = function (options, defaultWs, websocketEndpoint) {
|
||||
data: options,
|
||||
}));
|
||||
}, 500);
|
||||
});
|
||||
return ws;
|
||||
};
|
||||
exports.default = browserWS;
|
||||
|
||||
|
2
dist/mempool.min.js
vendored
2
dist/mempool.min.js
vendored
File diff suppressed because one or more lines are too long
@ -25,7 +25,7 @@
|
||||
"scripts": {
|
||||
"start": "ts-node src/index.ts",
|
||||
"dev": "nodemon src/index.ts",
|
||||
"build": "tsc | browserify lib/index.js --standalone mempoolJS > dist/mempool.js | browserify -p tinyify lib/index.js -o dist/mempool.min.js ",
|
||||
"build": "tsc | browserify lib/index.js --standalone mempoolJS > dist/mempool.js | browserify -p tinyify lib/index.js --standalone mempoolJS > dist/mempool.min.js",
|
||||
"prepare": "npm run build",
|
||||
"postversion": "git push && git push --tags"
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user