Merge pull request #654 from eordano/fix/buildErrors
Fix Error issues and other issues found with packaging
This commit is contained in:
commit
cf0561b98e
1
.gitignore
vendored
1
.gitignore
vendored
@ -15,3 +15,4 @@ npm-debug.log
|
|||||||
apiref
|
apiref
|
||||||
bower_components
|
bower_components
|
||||||
dist
|
dist
|
||||||
|
report
|
||||||
|
|||||||
@ -96,7 +96,8 @@ gulp.task('lint', function() {
|
|||||||
gulp.task('browser', ['errors'], function() {
|
gulp.task('browser', ['errors'], function() {
|
||||||
return gulp.src('index.js')
|
return gulp.src('index.js')
|
||||||
.pipe(browserify({
|
.pipe(browserify({
|
||||||
insertGlobals: true
|
insertGlobals: true,
|
||||||
|
standalone: 'bitcore'
|
||||||
}))
|
}))
|
||||||
.pipe(rename('bitcore.js'))
|
.pipe(rename('bitcore.js'))
|
||||||
.pipe(gulp.dest('browser'));
|
.pipe(gulp.dest('browser'));
|
||||||
@ -110,7 +111,7 @@ gulp.task('browser-all', ['errors'], function(callback) {
|
|||||||
runSequence(['browser'], ['browser-test'], callback);
|
runSequence(['browser'], ['browser-test'], callback);
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('karma', ['browser-test'], testKarma);
|
gulp.task('karma', ['browser-all'], testKarma);
|
||||||
|
|
||||||
gulp.task('errors', shell.task([
|
gulp.task('errors', shell.task([
|
||||||
'node ./lib/errors/build.js'
|
'node ./lib/errors/build.js'
|
||||||
|
|||||||
@ -14,10 +14,10 @@ var formatMessage = function(message) {
|
|||||||
var defineElement = function(fullName, baseClass, message) {
|
var defineElement = function(fullName, baseClass, message) {
|
||||||
return fullName + ' = function() {\n' +
|
return fullName + ' = function() {\n' +
|
||||||
' this.message = ' + formatMessage(message) + ';\n' +
|
' this.message = ' + formatMessage(message) + ';\n' +
|
||||||
' ' + baseClass + '.call(this, this.message);\n' +
|
' this.stack = this.message + \'\\n\' + (new Error()).stack;\n' +
|
||||||
' this.name = "' + fullName + '";\n' +
|
|
||||||
'};\n' +
|
'};\n' +
|
||||||
'inherits(' + fullName + ', ' + baseClass + ');\n\n';
|
fullName + '.prototype = Object.create(' + baseClass + '.prototype);\n' +
|
||||||
|
fullName + '.prototype.name = "' + fullName + '";\n\n';
|
||||||
};
|
};
|
||||||
|
|
||||||
var traverseNode = function(baseClass, errorDefinition) {
|
var traverseNode = function(baseClass, errorDefinition) {
|
||||||
|
|||||||
@ -4,7 +4,7 @@ module.exports = [{
|
|||||||
errors: [
|
errors: [
|
||||||
{
|
{
|
||||||
name: 'InvalidArgument',
|
name: 'InvalidArgument',
|
||||||
message: 'HDPrivateKey: Invalid Argument {0}, expected {1} but got {2}',
|
message: 'Invalid Argument {0}, expected {1} but got {2}',
|
||||||
errors: [{
|
errors: [{
|
||||||
name: 'InvalidB58Char',
|
name: 'InvalidB58Char',
|
||||||
message: 'Invalid Base58 character: {0} in {1}'
|
message: 'Invalid Base58 character: {0} in {1}'
|
||||||
@ -48,7 +48,7 @@ module.exports = [{
|
|||||||
errors: [
|
errors: [
|
||||||
{
|
{
|
||||||
name: 'InvalidArgument',
|
name: 'InvalidArgument',
|
||||||
message: 'HDPublicKey: Invalid Argument {0}, expected {1} but got {2}',
|
message: 'Invalid Argument {0}, expected {1} but got {2}',
|
||||||
errors: [{
|
errors: [{
|
||||||
name: 'ArgumentIsPrivateExtended',
|
name: 'ArgumentIsPrivateExtended',
|
||||||
message: 'Argument is an extended private key: {0}'
|
message: 'Argument is an extended private key: {0}'
|
||||||
|
|||||||
10
npm-shrinkwrap.json
generated
10
npm-shrinkwrap.json
generated
@ -38,6 +38,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"inherits": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"from": "inherits@2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz"
|
||||||
|
},
|
||||||
"hash.js": {
|
"hash.js": {
|
||||||
"version": "0.3.2",
|
"version": "0.3.2",
|
||||||
"from": "hash.js@0.3.2",
|
"from": "hash.js@0.3.2",
|
||||||
@ -49,6 +54,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"lodash": {
|
||||||
|
"version": "2.4.1",
|
||||||
|
"from": "lodash@=2.4.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.1.tgz"
|
||||||
|
},
|
||||||
"sha512": {
|
"sha512": {
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"from": "sha512@=0.0.1",
|
"from": "sha512@=0.0.1",
|
||||||
|
|||||||
@ -91,14 +91,11 @@
|
|||||||
"gulp-mocha": "^2.0.0",
|
"gulp-mocha": "^2.0.0",
|
||||||
"gulp-rename": "^1.2.0",
|
"gulp-rename": "^1.2.0",
|
||||||
"gulp-shell": "^0.2.10",
|
"gulp-shell": "^0.2.10",
|
||||||
"inherits": "^2.0.1",
|
|
||||||
"lodash": "^2.4.1",
|
|
||||||
"mocha": "~2.0.1",
|
"mocha": "~2.0.1",
|
||||||
"run-sequence": "^1.0.2",
|
"run-sequence": "^1.0.2",
|
||||||
"karma": "^0.12.28",
|
"karma": "^0.12.28",
|
||||||
"karma-firefox-launcher": "^0.1.3",
|
"karma-firefox-launcher": "^0.1.3",
|
||||||
"karma-mocha": "^0.1.9",
|
"karma-mocha": "^0.1.9",
|
||||||
"lodash": "^2.4.1",
|
|
||||||
"mocha": "~2.0.1",
|
"mocha": "~2.0.1",
|
||||||
"run-sequence": "^1.0.2"
|
"run-sequence": "^1.0.2"
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user