Adjust bundles (no @polkadot/networks) (#3754)
This commit is contained in:
+25
-10
@@ -2,34 +2,49 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title></title>
|
||||
<style></style>
|
||||
<title>Bundler tests</title>
|
||||
<style>
|
||||
pre {
|
||||
margin: 0.5rem 0;
|
||||
}
|
||||
|
||||
pre.header {
|
||||
background: #ddd;
|
||||
margin-top: 1.5rem;
|
||||
padding: 0.25rem 0.75rem;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
Executing bundle tests, see the dev console for output ...
|
||||
<script>
|
||||
function log (label, result) {
|
||||
label.startsWith('*')
|
||||
? console.log(label)
|
||||
: console.log(label.padStart(24), '=', result);
|
||||
const pre = document.createElement('pre');
|
||||
|
||||
if (typeof result !== 'undefined') {
|
||||
pre.innerHTML = `${label.padStart(24)} = ${result}`;
|
||||
} else {
|
||||
pre.innerHTML = label;
|
||||
pre.className = 'header';
|
||||
}
|
||||
|
||||
document.body.appendChild(pre);
|
||||
}
|
||||
</script>
|
||||
<script src="node_modules/@polkadot/util/bundle-polkadot-util.js"></script>
|
||||
<script src="node_modules/@polkadot/networks/bundle-polkadot-networks.js"></script>
|
||||
<script src="node_modules/@polkadot/util-crypto/bundle-polkadot-util-crypto.js"></script>
|
||||
<script src="node_modules/@polkadot/keyring/bundle-polkadot-keyring.js"></script>
|
||||
<script src="packages/types/build/bundle-polkadot-types.js"></script>
|
||||
<script>
|
||||
log('*** polkadotTypes');
|
||||
log('polkadotTypes');
|
||||
|
||||
const { TypeRegistry } = polkadotTypes;
|
||||
const registry = new TypeRegistry();
|
||||
|
||||
console.log('createType', registry.createType('Balance', 1234567890).toHuman());
|
||||
log('createType', registry.createType('Balance', 1234567890).toHuman());
|
||||
</script>
|
||||
<script src="packages/api/build/bundle-polkadot-api.js"></script>
|
||||
<script>
|
||||
log('*** polkadotApi');
|
||||
log('polkadotApi');
|
||||
|
||||
const { ApiPromise, WsProvider } = polkadotApi;
|
||||
const provider = new WsProvider('wss://rpc.polkadot.io');
|
||||
|
||||
Reference in New Issue
Block a user