From e3d2d58950988ee715026108d4b3c49bf539259b Mon Sep 17 00:00:00 2001 From: lash Date: Tue, 5 Sep 2023 03:19:53 +0100 Subject: [PATCH] Add script to locally serve application --- js/build.sh | 33 ++++++++++++++++++++++ js/index.html | 60 +++++++++++++++++++++++++++++++++++++--- js/main.js | 73 ++++++++++++++++++++++++++++++++++++------------- js/package.json | 3 ++ js/promise.js | 32 ++++++++++++++++++++++ js/registry.js | 23 ++++++++++++++-- js/rpc.js | 21 +++++++++++++- js/run.js | 11 +++++++- js/wala.js | 35 ++++++++++++++++++++++++ 9 files changed, 264 insertions(+), 27 deletions(-) create mode 100644 js/build.sh create mode 100644 js/promise.js create mode 100644 js/wala.js diff --git a/js/build.sh b/js/build.sh new file mode 100644 index 0000000..ba15985 --- /dev/null +++ b/js/build.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +PUP_BIN=/home/lash/src/build/pup/pup +cat node_modules/openpgp/dist/openpgp.min.js node_modules/MimeJS/src/base64.js node_modules/MimeJS/dist/mime-js.min.js node_modules/jssha/dist/sha256.js run.js booteth/wallet.js booteth/session.js booteth/eip1193.js registry.js wala.js promise.js rpc.js > tmp.js +node node_modules/uglify-js/bin/uglifyjs tmp.js > src.js + +echo -n "" > standalone.html +cat index.html | $PUP_BIN "head title" >> standalone.html +cat index.html | $PUP_BIN "head style" >> standalone.html +echo -n "" >> standalone.html +#echo -n "" >> standalone.html +cat <> standalone.html + + +eof +cat index.html | $PUP_BIN "body" >> standalone.html +echo -n "" >> standalone.html diff --git a/js/index.html b/js/index.html index 46ae145..03d073c 100644 --- a/js/index.html +++ b/js/index.html @@ -5,13 +5,20 @@ + + + - + +