Skip to content

Commit

Permalink
web3 in global namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
debris committed Apr 9, 2015
1 parent ccc59d1 commit 0ccc05a
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 28 deletions.
13 changes: 6 additions & 7 deletions dist/web3-light.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/web3-light.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/web3-light.min.js

Large diffs are not rendered by default.

13 changes: 6 additions & 7 deletions dist/web3.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/web3.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/web3.min.js

Large diffs are not rendered by default.

13 changes: 6 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
// dont override global variable
if (typeof web3 !== 'undefined') {
var web3;
}

web3 = require('./lib/web3');
var web3 = require('./lib/web3');
web3.providers.HttpProvider = require('./lib/web3/httpprovider');
web3.providers.QtSyncProvider = require('./lib/web3/qtsync');
web3.eth.contract = require('./lib/web3/contract');
web3.abi = require('./lib/solidity/abi');


// dont override global variable
if (typeof window !== 'undefined' && typeof window.web3 === 'undefined') {
window.web3 = web3;
}

module.exports = web3;

0 comments on commit 0ccc05a

Please sign in to comment.