Commit 0140ddb2 authored by yann300's avatar yann300

loading app from browser

parent 275833fa
...@@ -2,7 +2,14 @@ ...@@ -2,7 +2,14 @@
<html> <html>
<head> <head>
</head> </head>
<body> <body onload="loadDebugger()" >
<script type="text/javascript">
function loadDebugger() {
var container = document.getElementById('app')
container.vmdebugger = new window.remix.Debugger()
container.appendChild(container.vmdebugger.render())
}
</script>
<div id="app"></div> <div id="app"></div>
<script src="build/app.js"></script> <script src="build/app.js"></script>
</body> </body>
......
var Debugger = require('./src/Ethdebugger')
module.exports = Debugger
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
"email": "liana@ethdev.com" "email": "liana@ethdev.com"
} }
], ],
"main": "index.js", "main": "./build/app.js",
"dependencies": { "dependencies": {
"browserify": "^13.0.1", "browserify": "^13.0.1",
"web3": "^0.15.3", "web3": "^0.15.3",
...@@ -35,7 +35,8 @@ ...@@ -35,7 +35,8 @@
"nightwatch_remote_firefox": "nightwatch --config nightwatch.js --env default", "nightwatch_remote_firefox": "nightwatch --config nightwatch.js --env default",
"nightwatch_remote_chrome": "nightwatch --config nightwatch.js --env chrome", "nightwatch_remote_chrome": "nightwatch --config nightwatch.js --env chrome",
"nightwatch_remote_safari": "nightwatch --config nightwatch.js --env safari", "nightwatch_remote_safari": "nightwatch --config nightwatch.js --env safari",
"nightwatch_remote_ie": "nightwatch --config nightwatch.js --env ie" "nightwatch_remote_ie": "nightwatch --config nightwatch.js --env ie",
"prepublish": "npm run build"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
......
'use strict' 'use strict'
var Debugger = require('./Ethdebugger') var Debugger = require('./Ethdebugger')
function init () { if (typeof (module) !== 'undefined' && typeof (module.exports) !== 'undefined') {
var container = document.getElementById('app') module.exports = {
container.vmdebugger = new Debugger() Debugger: Debugger
container.appendChild(container.vmdebugger.render()) }
} }
init() if (window) {
window.remix = {
Debugger: Debugger
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment