fix(examples): update using new bundles

This commit is contained in:
fryorcraken.eth 2022-08-06 00:41:41 +10:00
parent d560f8ce0e
commit 5f1ac595b6
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
2 changed files with 10 additions and 6 deletions

View File

@ -27,10 +27,12 @@
*/ */
import { import {
createWaku,
waitForRemotePeer, waitForRemotePeer,
WakuMessage WakuMessage
} from '../../dist/bundle.js'; } from '../../bundle/index.js';
import {
createWaku,
} from '../../bundle/lib/create_waku.js';
const statusDiv = document.getElementById('status'); const statusDiv = document.getElementById('status');
const messagesDiv = document.getElementById('messages'); const messagesDiv = document.getElementById('messages');
@ -56,7 +58,7 @@
// We are currently working on migrating this method to DNS Discovery. // We are currently working on migrating this method to DNS Discovery.
// //
// https://js-waku.wakuconnect.dev/classes/waku.Waku.html#create // https://js-waku.wakuconnect.dev/classes/waku.Waku.html#create
const waku = await createWaku({ bootstrap: { default: true } }); const waku = await createWaku({ defaultBootstrap: true });
await waku.start(); await waku.start();
// Had a hook to process all incoming messages on a specified content topic. // Had a hook to process all incoming messages on a specified content topic.

View File

@ -14,10 +14,12 @@
<script type='module'> <script type='module'>
import { import {
createWaku,
waitForRemotePeer, waitForRemotePeer,
Protocols Protocols
} from '../../dist/bundle.min.js'; } from '../../bundle/index.js';
import {
createWaku,
} from '../../bundle/lib/create_waku.js';
/** /**
* This example demonstrates how to use the js-waku minified bundle * This example demonstrates how to use the js-waku minified bundle
@ -30,7 +32,7 @@
try { try {
timestampDiv.innerHTML = '<p>Creating waku.</p>'; timestampDiv.innerHTML = '<p>Creating waku.</p>';
const node = await createWaku({ bootstrap: { default: true } }); const node = await createWaku({ defaultBootstrap: true });
timestampDiv.innerHTML = '<p>Starting waku.</p>'; timestampDiv.innerHTML = '<p>Starting waku.</p>';
await node.start(); await node.start();