Skip to content

Commit

Permalink
working on getting browserify/browser working well, related to #27
Browse files Browse the repository at this point in the history
  • Loading branch information
quartzjer committed Jan 29, 2015
1 parent 8c5222d commit bc626b2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
7 changes: 7 additions & 0 deletions browser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// export it globally in the browser
var telehash = window.telehash = require('./index');

// enable logging by default (at this stage)
telehash.log({debug:function(){console.log( Array.prototype.slice.call(arguments) );}});

console.log('telehash loaded');
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"mesh" : "./bin/mesh.js"
},
"scripts": {
"browserify": "browserify index.js -o bundle.js",
"browserify": "browserify browser.js -o bundle.js",
"start":"node ./bin/router.js",
"router":"node ./bin/router.js",
"mesh":"node ./bin/mesh.js",
Expand Down
5 changes: 5 additions & 0 deletions test/browser/load.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<script src="../../bundle.js"></script>
Loaded.
<script>
console.log(telehash)
</script>

0 comments on commit bc626b2

Please sign in to comment.