Browse Source

Transaction, Connection, Peer, Block, ScriptInterpreter working in the browser!

patch-2
Manuel Araoz 11 years ago
parent
commit
8ab1c3feae
  1. 5
      Gruntfile.js
  2. 1
      README.md
  3. 2
      bitcore.js
  4. 3
      package.json
  5. 5
      test/index.html

5
Gruntfile.js

@ -15,7 +15,10 @@ module.exports = function(grunt) {
dest: 'browser/bundle.js', dest: 'browser/bundle.js',
options: { options: {
debug: true, debug: true,
alias: ['browserify-bignum/bignumber.js:bignum'], alias: [
'browserify-bignum/bignumber.js:bignum',
'browserify-buffertools/buffertools.js:buffertools'
],
standalone: 'bitcore', standalone: 'bitcore',
} }
}, },

1
README.md

@ -46,6 +46,7 @@ Bitcore is still under heavy development and not quite ready for "drop-in" produ
#Contributing #Contributing
Bitcore needs some developer love. Please send pull requests for bug fixes, code optimization, and ideas for improvement. Bitcore needs some developer love. Please send pull requests for bug fixes, code optimization, and ideas for improvement.
#Browser support
Work to enable Bitcore for use in the browser is ongoing. To build bitcore for the browser: Work to enable Bitcore for use in the browser is ongoing. To build bitcore for the browser:
``` ```
npm install -g grunt-cli npm install -g grunt-cli

2
bitcore.js

@ -10,6 +10,7 @@ module.exports.VersionedData = require('./util/VersionedData');
module.exports.Address = require('./Address'); module.exports.Address = require('./Address');
module.exports.config = require('./config'); module.exports.config = require('./config');
module.exports.log = require('./util/log'); module.exports.log = require('./util/log');
module.exports.networks = require('./networks');
module.exports.Opcode = require('./Opcode'); module.exports.Opcode = require('./Opcode');
module.exports.util = require('./util/util'); module.exports.util = require('./util/util');
module.exports.Script = require('./Script'); module.exports.Script = require('./Script');
@ -19,7 +20,6 @@ module.exports.Peer = require('./Peer');
module.exports.Block = require('./Block'); module.exports.Block = require('./Block');
module.exports.Connection = require('./Connection'); module.exports.Connection = require('./Connection');
module.exports.ScriptInterpreter = require('./ScriptInterpreter'); module.exports.ScriptInterpreter = require('./ScriptInterpreter');
module.exports.networks = require('./networks');
if (typeof process.versions === 'undefined') { if (typeof process.versions === 'undefined') {

3
package.json

@ -40,7 +40,8 @@
"buffers": "=0.1.1", "buffers": "=0.1.1",
"buffertools": "~2.0.1", "buffertools": "~2.0.1",
"mocha": ">=1.15.1", "mocha": ">=1.15.1",
"browserify-bignum": "git://github.com/maraoz/browserify-bignum.git" "browserify-bignum": "git://github.com/maraoz/browserify-bignum.git",
"browserify-buffertools": "~1.0.2"
}, },
"devDependencies": { "devDependencies": {
"grunt-contrib-watch": "~0.5.3", "grunt-contrib-watch": "~0.5.3",

5
test/index.html

@ -22,6 +22,11 @@
<script src="test.Address.js"></script> <script src="test.Address.js"></script>
<script src="test.Opcode.js"></script> <script src="test.Opcode.js"></script>
<script src="test.Script.js"></script> <script src="test.Script.js"></script>
<script src="test.Transaction.js"></script>
<script src="test.Peer.js"></script>
<script src="test.Block.js"></script>
<script src="test.Connection.js"></script>
<script src="test.ScriptInterpreter.js"></script>
<script src="test.misc.js"></script> <script src="test.misc.js"></script>
<script> <script>
mocha.run(); mocha.run();

Loading…
Cancel
Save