Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ddorgan
polkadot
Commits
5b33b7a7
Unverified
Commit
5b33b7a7
authored
Dec 02, 2019
by
Ashley
Browse files
Add browser-demo
parent
868f6e51
Changes
6
Hide whitespace changes
Inline
Side-by-side
browser-demo/.gitignore
→
cli/
browser-demo/.gitignore
View file @
5b33b7a7
File moved
browser-demo/README.md
→
cli/
browser-demo/README.md
View file @
5b33b7a7
File moved
browser-demo/build.sh
→
cli/
browser-demo/build.sh
View file @
5b33b7a7
#!/usr/bin/env sh
wasm-pack build
--target
web
--out-dir
./browser-demo/pkg
--no-typescript
--release
.
./cli
--
--no-default-features
--features
"browser"
wasm-pack build
--target
web
--out-dir
./browser-demo/pkg
--no-typescript
--release
.
/..
--
--no-default-features
--features
"browser"
python
-m
SimpleHTTPServer 8000
browser-demo/favicon.png
→
cli/
browser-demo/favicon.png
View file @
5b33b7a7
File moved
browser-demo/index.html
→
cli/
browser-demo/index.html
View file @
5b33b7a7
...
...
@@ -5,7 +5,7 @@
<title>
Substrate node
</title>
<link
rel=
"shortcut icon"
href=
"/favicon.png"
/>
<script
type=
"module"
>
import
{
start_client
,
default
as
init
}
from
'
./pkg/
node
_cli.js
'
;
import
{
start_client
,
default
as
init
}
from
'
./pkg/
polkadot
_cli.js
'
;
import
ws
from
'
./ws.js
'
;
function
log
(
msg
)
{
...
...
@@ -14,7 +14,7 @@ function log(msg) {
async
function
start
()
{
log
(
'
Loading WASM
'
);
await
init
(
'
./pkg/
node
_cli_bg.wasm
'
);
await
init
(
'
./pkg/
polkadot
_cli_bg.wasm
'
);
log
(
'
Successfully loaded WASM
'
);
// Build our client.
...
...
browser-demo/ws.js
→
cli/
browser-demo/ws.js
View file @
5b33b7a7
File moved
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment