-
Notifications
You must be signed in to change notification settings - Fork 760
/
browser.html
33 lines (26 loc) · 1.19 KB
/
browser.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!doctype html>
<html>
<head>
<title>EthereumJS Browser Examples</title>
<script src="./common.ts" type="module"></script>
</head>
<body style="padding:50px; font-family: Arial, Helvetica, sans-serif;">
<h1>Common | @ethereumjs/common</h1>
Basic usage of this library in the browser (using <a href="https://github.com/vitejs/vite" target="_blank">Vite</a>)
<h3>Run the Example</h3>
<ol>
<li>Go to the library root directory (packages/[LIBRARY_NAME]/)</li>
<li>Build "dist" folder with: npm run build</li>
<li>Start Vite development server with: npx vite</li>
<li>Open the example URL in the browser (http://localhost:5173/examples/browser.html)</li>
<li>Open the development console (e.g. Chrome Developer Tools)</li>
<li>See example results and play with the code</li>
</ol>
<h3>Interactive CLI</h3>
<ol>
<li>Open the "Sources" or "Debugger" tab in the browser development console</li>
<li>Eventually reload the page, set a breakpoint within the referenced TypeScript .ts file</li>
<li>Now you can use the debugger and play with and change the imported EthereumJS code</li>
</ol>
</body>
</html>