bitpay / bitcore-build Goto Github PK
View Code? Open in Web Editor NEWA helper to add tasks to gulp
A helper to add tasks to gulp
Currently bumping the version in npm-shrinkwrap.json needs to be done manually.
Firstly, when skipBrowsers is enabled, the browser dependencies still need to be installed. Second, "phantomjs" is downloaded by "karma-detect-browsers" even though it's not used (even when browser tasks are enabled).
It may be unnecessary to include the version number in bower.json, see: bitpay/bitcore#1272
npm@3 install modules maximally flat and browserify can be installed on same level as bitcore-build and path to binary should be (for npm@3)
./node_modules/.bin/browserify
instead
./node_modules/bitcore-build/node_modules/.bin/browserify
full error message:
$ gulp test:browser
[16:12:47] Using gulpfile ~/work/bitcore-lib/gulpfile.js
[16:12:47] Starting 'browser:uncompressed'...
[16:12:47] Starting 'browser:maketests'...
/bin/sh: ./node_modules/bitcore-build/node_modules/.bin/browserify: No such file or directory
[16:12:47] 'browser:uncompressed' errored after 39 ms
[16:12:47] Error in plugin 'gulp-shell'
Message:
Command failed: /bin/sh -c ./node_modules/bitcore-build/node_modules/.bin/browserify --require ./index.js:bitcore-lib -o bitcore-lib.js
/bin/sh: ./node_modules/bitcore-build/node_modules/.bin/browserify: No such file or directory
Details:
killed: false
code: 127
signal: null
cmd: /bin/sh -c ./node_modules/bitcore-build/node_modules/.bin/browserify --require ./index.js:bitcore-lib -o bitcore-lib.js
stdout:
stderr: /bin/sh: ./node_modules/bitcore-build/node_modules/.bin/browserify: No such file or directory
xargs: ./node_modules/bitcore-build/node_modules/.bin/browserify: No such file or directory
[16:12:47] 'browser:maketests' errored after 26 ms
[16:12:47] Error in plugin 'gulp-shell'
Message:
Command failed: /bin/sh -c find test/ -type f -name "*.js" | xargs ./node_modules/bitcore-build/node_modules/.bin/browserify -t brfs -o tests.js
xargs: ./node_modules/bitcore-build/node_modules/.bin/browserify: No such file or directory
Details:
killed: false
code: 127
signal: null
cmd: /bin/sh -c find test/ -type f -name "*.js" | xargs ./node_modules/bitcore-build/node_modules/.bin/browserify -t brfs -o tests.js
stdout:
stderr: xargs: ./node_modules/bitcore-build/node_modules/.bin/browserify: No such file or directory
Commit Message shows "Bump package version to 0.10.3"
package.json shows "0.11.0"
I think there's no actual reason why it needs to be there.
We could have a tag/branch called "current" to signify what's the latest release, but the current schema of "having a branch with merge commits between the last build commit (the ones with the binaries) and the current master be the next release commit" I feel that has no use case or reason to be kept.
I'm using bitcore 0.8.5 from bower.
Using the minified brower bundle, several bitcore functions fail because they expect arguments to be of a certain type, which uglify has mangled to a single letter name.
For example
https://github.com/bitpay/bitcore/blob/master/lib/address.js#L231
if (!(pubkey instanceof PublicKey)) {
throw new TypeError('Address must be an instance of PublicKey.');
}
but PublicKey
has been mangled to a single letter and I get the following error:
TypeError: Address must be an instance of PublicKey.
at Function.n._transformPublicKey (http://localhost:9000/bower_components/bitcore/browser/bitcore.min.js:1:5708)
at Function.n.fromPublicKey (http://localhost:9000/bower_components/bitcore/browser/bitcore.min.js:1:6453)
at l.d.toAddress (http://localhost:9000/bower_components/bitcore/browser/bitcore.min.js:4:4457)
Currently index.js
is the assumed entry point, in some cases we may want to specify a separate entry point for browser versions so that node code isn't included.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.