mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 20:25:48 +00:00
do not pack lodash inside browser version
This commit is contained in:
@@ -16,6 +16,9 @@ function webpackConfig(extension, overrides) {
|
|||||||
overrides = overrides || {};
|
overrides = overrides || {};
|
||||||
var defaults = {
|
var defaults = {
|
||||||
cache: true,
|
cache: true,
|
||||||
|
externals: [{
|
||||||
|
'lodash': '_'
|
||||||
|
}],
|
||||||
entry: './src/index.js',
|
entry: './src/index.js',
|
||||||
output: {
|
output: {
|
||||||
library: 'ripple',
|
library: 'ripple',
|
||||||
@@ -52,6 +55,7 @@ function webpackConfigForWebTest(testFileName, path) {
|
|||||||
}
|
}
|
||||||
var configOverrides = {
|
var configOverrides = {
|
||||||
externals: [{
|
externals: [{
|
||||||
|
'lodash': '_',
|
||||||
'ripple-api': 'ripple',
|
'ripple-api': 'ripple',
|
||||||
'net': 'null'
|
'net': 'null'
|
||||||
}],
|
}],
|
||||||
|
|||||||
@@ -6,14 +6,14 @@ const assert = require('assert');
|
|||||||
const errors = require('../../src/common/errors');
|
const errors = require('../../src/common/errors');
|
||||||
const wallet = require('./wallet');
|
const wallet = require('./wallet');
|
||||||
const requests = require('../fixtures/requests');
|
const requests = require('../fixtures/requests');
|
||||||
const RippleAPI = require('../../src').RippleAPI;
|
const RippleAPI = require('ripple-api').RippleAPI;
|
||||||
const {isValidAddress} = require('ripple-address-codec');
|
const {isValidAddress} = require('ripple-address-codec');
|
||||||
const {isValidSecret} = require('../../src/common');
|
const {isValidSecret} = require('../../src/common');
|
||||||
const {payTo, ledgerAccept} = require('./utils');
|
const {payTo, ledgerAccept} = require('./utils');
|
||||||
|
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
const TIMEOUT = process.browser ? 85000 : 10000;
|
const TIMEOUT = process.browser ? 25000 : 10000;
|
||||||
const INTERVAL = 1000; // how long to wait between checks for validated ledger
|
const INTERVAL = 1000; // how long to wait between checks for validated ledger
|
||||||
|
|
||||||
const serverUrl = 'ws://127.0.0.1:6006';
|
const serverUrl = 'ws://127.0.0.1:6006';
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<!-- encoding must be set for mocha's special characters to render properly -->
|
<!-- encoding must be set for mocha's special characters to render properly -->
|
||||||
<link rel="stylesheet" href="../node_modules/mocha/mocha.css" />
|
<link rel="stylesheet" href="../node_modules/mocha/mocha.css" />
|
||||||
|
<script src="http://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.10.1/lodash.min.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="deb"></div>
|
<div id="deb"></div>
|
||||||
@@ -45,6 +46,9 @@
|
|||||||
</script>
|
</script>
|
||||||
<script src="../test-compiled-for-web/ripple-for-web-tests.js"></script>
|
<script src="../test-compiled-for-web/ripple-for-web-tests.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
if (window.initMochaPhantomJS) {
|
||||||
|
window.initMochaPhantomJS();
|
||||||
|
}
|
||||||
mocha.ui('bdd')
|
mocha.ui('bdd')
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<!-- encoding must be set for mocha's special characters to render properly -->
|
<!-- encoding must be set for mocha's special characters to render properly -->
|
||||||
<link rel="stylesheet" href="../node_modules/mocha/mocha.css" />
|
<link rel="stylesheet" href="../node_modules/mocha/mocha.css" />
|
||||||
|
<script src="http://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.10.1/lodash.min.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="deb"></div>
|
<div id="deb"></div>
|
||||||
@@ -45,6 +46,9 @@
|
|||||||
</script>
|
</script>
|
||||||
<script src="../test-compiled-for-web/ripple-for-web-tests.js"></script>
|
<script src="../test-compiled-for-web/ripple-for-web-tests.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
if (window.initMochaPhantomJS) {
|
||||||
|
window.initMochaPhantomJS();
|
||||||
|
}
|
||||||
mocha.ui('bdd')
|
mocha.ui('bdd')
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user