diff --git a/index.html b/index.html index 2a85beba5e..052c51ed95 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,14 @@ - + +
diff --git a/index.js b/index.js deleted file mode 100644 index 46f9a28b07..0000000000 --- a/index.js +++ /dev/null @@ -1,2 +0,0 @@ -var Debugger = require('./src/Ethdebugger') -module.exports = Debugger diff --git a/package.json b/package.json index 656b543c86..1b2c334ae2 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "email": "liana@ethdev.com" } ], - "main": "index.js", + "main": "./build/app.js", "dependencies": { "browserify": "^13.0.1", "web3": "^0.15.3", @@ -35,7 +35,8 @@ "nightwatch_remote_firefox": "nightwatch --config nightwatch.js --env default", "nightwatch_remote_chrome": "nightwatch --config nightwatch.js --env chrome", "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": { "type": "git", diff --git a/src/index.js b/src/index.js index ec0d827cdd..5259620a75 100644 --- a/src/index.js +++ b/src/index.js @@ -1,8 +1,13 @@ 'use strict' var Debugger = require('./Ethdebugger') -function init () { - var container = document.getElementById('app') - container.vmdebugger = new Debugger() - container.appendChild(container.vmdebugger.render()) +if (typeof (module) !== 'undefined' && typeof (module.exports) !== 'undefined') { + module.exports = { + Debugger: Debugger + } } -init() +if (window) { + window.remix = { + Debugger: Debugger + } +} +