aboutsummaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
Diffstat (limited to 'library')
-rw-r--r--library/README.md20
-rw-r--r--library/example/index.js2
-rw-r--r--library/index.js5
-rw-r--r--library/server.js9
4 files changed, 22 insertions, 14 deletions
diff --git a/library/README.md b/library/README.md
index 7dc291564..6a6574dbd 100644
--- a/library/README.md
+++ b/library/README.md
@@ -3,4 +3,22 @@ start the dual servers (dapp + mascara)
node server.js
```
-open the example dapp at `http://localhost:9002/` \ No newline at end of file
+open the example dapp at `http://localhost:9002/`
+
+*You will need to build MetaMask in order for this to work*
+```
+gulp dev
+```
+to build MetaMask and have it live reload if you make changes
+
+
+## First time use:
+
+- navigate to: http://127.0.0.1:9001/popup/popup.html
+- Create an Account
+- go back to http://localhost:9002/
+- open devTools
+- click Sync Tx
+
+### Todos
+- Look into using [Service Workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API)
diff --git a/library/example/index.js b/library/example/index.js
index b23c15307..4a107df6a 100644
--- a/library/example/index.js
+++ b/library/example/index.js
@@ -17,7 +17,7 @@ function startApp(){
console.log('getting main account...')
web3.eth.getAccounts(function(err, addresses){
if (err) throw err
- console.log('set address')
+ console.log('set address', addresses[0])
primaryAccount = addresses[0]
})
diff --git a/library/index.js b/library/index.js
index ab341f1f8..b5f4f6637 100644
--- a/library/index.js
+++ b/library/index.js
@@ -4,7 +4,6 @@ const setupProvider = require('./lib/setup-provider.js')
//
// setup web3
//
-
var provider = setupProvider()
hijackProvider(provider)
var web3 = new Web3(provider)
@@ -27,7 +26,7 @@ var shouldPop = false
window.addEventListener('click', function(){
if (!shouldPop) return
shouldPop = false
- window.open('http://127.0.0.1:9001/popup/popup.html', '', 'width=1000')
+ window.open('http://127.0.0.1:9001/popup/popup.html', '', 'width=360 height=500')
console.log('opening window...')
})
@@ -41,4 +40,4 @@ function hijackProvider(provider){
}
_super(payload, cb)
}
-} \ No newline at end of file
+}
diff --git a/library/server.js b/library/server.js
index bb0b24e50..797ad8a77 100644
--- a/library/server.js
+++ b/library/server.js
@@ -80,15 +80,6 @@ function createBundle(entryPoint){
plugin: [watchify],
})
- // global transpile
- var bablePreset = require.resolve('babel-preset-es2015')
-
- bundler.transform(babelify, {
- global: true,
- presets: [bablePreset],
- babelrc: false,
- })
-
bundler.on('update', bundle)
bundle()