mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-04 10:45:50 +00:00
Added JS build script.
This commit is contained in:
8
.gitignore
vendored
8
.gitignore
vendored
@@ -14,13 +14,7 @@
|
||||
|
||||
# Ignore object files.
|
||||
*.o
|
||||
build/obj/*
|
||||
build/proto/*
|
||||
build/bin/rippled
|
||||
build/rippled
|
||||
|
||||
# Ignore JavaScript build targets
|
||||
build/ripple.js
|
||||
build
|
||||
|
||||
# Ignore locally installed node_modules
|
||||
node_modules
|
||||
|
||||
26
package.json
Normal file
26
package.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "ripple",
|
||||
"version": "0.7.0",
|
||||
"description": "Open-source peer-to-peer payment network",
|
||||
"directories": {
|
||||
"test": "test"
|
||||
},
|
||||
"dependencies": {
|
||||
"async": "~0.1.22",
|
||||
"ws": "~0.4.22",
|
||||
"extend": "~1.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"buster": "~0.6.2",
|
||||
"webpack": "~0.7.17"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "buster test"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/jedmccaleb/NewCoin.git"
|
||||
},
|
||||
"readmeFilename": "README"
|
||||
|
||||
}
|
||||
@@ -7,7 +7,7 @@ var utils = require('./utils.js');
|
||||
var jsbn = require('./jsbn.js');
|
||||
|
||||
// Don't include in browser context.
|
||||
var config = require('../test/config.js');
|
||||
var config = require('../../test/config.js');
|
||||
|
||||
var BigInteger = jsbn.BigInteger;
|
||||
var nbi = jsbn.nbi;
|
||||
|
||||
@@ -22,7 +22,7 @@ var Amount = require('./amount.js').Amount;
|
||||
var UInt160 = require('./amount.js').UInt160;
|
||||
|
||||
// Don't include in browser context.
|
||||
var config = require('../test/config.js');
|
||||
var config = require('../../test/config.js');
|
||||
|
||||
// Request events emmitted:
|
||||
// 'success' : Request successful.
|
||||
|
||||
1
web_modules/domain.js
Normal file
1
web_modules/domain.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = null;
|
||||
1
web_modules/ws.js
Normal file
1
web_modules/ws.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = WebSocket;
|
||||
39
webpack.js
Normal file
39
webpack.js
Normal file
@@ -0,0 +1,39 @@
|
||||
var pkg = require('./package.json');
|
||||
var webpack = require("webpack");
|
||||
var async = require("async");
|
||||
var extend = require("extend");
|
||||
|
||||
var programPath = __dirname + "/src/js/remote.js";
|
||||
|
||||
console.log('Compiling Ripple JavaScript...');
|
||||
var builds = [{
|
||||
filename: 'ripple-'+pkg.version+'.js',
|
||||
},{
|
||||
filename: 'ripple-'+pkg.version+'-debug.js',
|
||||
debug: true
|
||||
},{
|
||||
filename: 'ripple-'+pkg.version+'-min.js',
|
||||
minimize: true
|
||||
}];
|
||||
|
||||
|
||||
async.series(builds.map(build), function (err) {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
}
|
||||
});
|
||||
|
||||
var defaultOpts = {
|
||||
library: 'ripple',
|
||||
};
|
||||
function build(opts) {
|
||||
var opts = extend({}, defaultOpts, opts);
|
||||
opts.output = __dirname + "/build/"+opts.filename;
|
||||
return function (callback) {
|
||||
var filename = opts.filename;
|
||||
webpack(programPath, opts, function (err, result) {
|
||||
console.log(' '+filename, result.hash, '['+result.modulesCount+']');
|
||||
callback(err);
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user