Skip to content

Commit

Permalink
Merge 2d5e32c into 8fcacd3
Browse files Browse the repository at this point in the history
  • Loading branch information
d4l3k committed Sep 21, 2018
2 parents 8fcacd3 + 2d5e32c commit cc1ad4f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
17 changes: 14 additions & 3 deletions playground/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<meta charset="utf-8">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700|Source+Sans+Pro:400,700" rel="stylesheet">
<link rel="stylesheet" href="node_modules/xterm/dist/xterm.css" />
<link rel="stylesheet" href="node_modules/nprogress/nprogress.css"/>

<style>
body {
color: white;
Expand All @@ -17,6 +19,7 @@
}
#terminal {
display: inline-block;
max-width: 100%;
}
pre, h2 {
font-family: 'Source Code Pro';
Expand Down Expand Up @@ -45,8 +48,13 @@ <h1>go-pry: web</h1>
<h2>hello!<b> </b>👋</h2>
<p>This is a version of <a href="https://github.com/d4l3k/go-pry">go-pry</a>
that runs in your browser using WebAssembly! It's missing a few features
like advanced auto complete since the browser doesn't have filesystem
access.</p>
but works pretty well for the most part.</p>

<p>This sometimes takes quite a while to load in Chrome, but it's almost
instant in Firefox.</p>

<p>I'm pretty excited to try using this to demo popular client
libraries.</p>

<h2>go-pry import bundles</h2>
<ul>
Expand All @@ -61,7 +69,9 @@ <h2>go-pry import bundles</h2>
<p>Created by <a href="https://fn.lc">Tristan Rice</a>.</p>


<script src="node_modules/xterm/dist/xterm.js"></script><Paste>
<script src="node_modules/nprogress/nprogress.js"></script>
<script>NProgress.start()</script>
<script src="node_modules/xterm/dist/xterm.js"></script>
<script src="wasm_exec.js"></script>
<script>

Expand All @@ -88,6 +98,7 @@ <h2>go-pry import bundles</h2>

const go = new Go();
WebAssembly.instantiateStreaming(wasm, go.importObject).then((result) => {
NProgress.done()
go.run(result.instance);
});
})
Expand Down
1 change: 1 addition & 0 deletions playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"main": "index.js",
"license": "MIT",
"dependencies": {
"nprogress": "^0.2.0",
"xterm": "^3.7.0"
}
}
4 changes: 4 additions & 0 deletions playground/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
# yarn lockfile v1


nprogress@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/nprogress/-/nprogress-0.2.0.tgz#cb8f34c53213d895723fcbab907e9422adbcafb1"

xterm@^3.7.0:
version "3.7.0"
resolved "https://registry.yarnpkg.com/xterm/-/xterm-3.7.0.tgz#b3eb1335dc04b92abe361711731d3b661e13db17"

0 comments on commit cc1ad4f

Please sign in to comment.