Examples HTML now serve higlighted py
This commit is contained in:
parent
17aa5fd6f9
commit
eb74c8770d
5
Makefile
5
Makefile
@ -9,6 +9,9 @@ WASM2C := $(WABT_DIR)/bin/wasm2c
|
|||||||
%.wat.html: %.wat
|
%.wat.html: %.wat
|
||||||
venv/bin/pygmentize -l wat -O full -f html $^ -o $@
|
venv/bin/pygmentize -l wat -O full -f html $^ -o $@
|
||||||
|
|
||||||
|
%.py.html: %.py
|
||||||
|
venv/bin/pygmentize -l py -O full -f html $^ -o $@
|
||||||
|
|
||||||
%.wasm: %.wat
|
%.wasm: %.wat
|
||||||
$(WAT2WASM) $^ -o $@
|
$(WAT2WASM) $^ -o $@
|
||||||
|
|
||||||
@ -18,7 +21,7 @@ WASM2C := $(WABT_DIR)/bin/wasm2c
|
|||||||
# %.exe: %.c
|
# %.exe: %.c
|
||||||
# cc $^ -o $@ -I $(WABT_DIR)/wasm2c
|
# cc $^ -o $@ -I $(WABT_DIR)/wasm2c
|
||||||
|
|
||||||
examples: venv/.done $(subst .py,.wasm,$(wildcard examples/*.py)) $(subst .py,.wat.html,$(wildcard examples/*.py))
|
examples: venv/.done $(subst .py,.wasm,$(wildcard examples/*.py)) $(subst .py,.wat.html,$(wildcard examples/*.py)) $(subst .py,.py.html,$(wildcard examples/*.py))
|
||||||
venv/bin/python3 -m http.server --directory examples
|
venv/bin/python3 -m http.server --directory examples
|
||||||
|
|
||||||
test: venv/.done
|
test: venv/.done
|
||||||
|
|||||||
1
examples/.gitignore
vendored
1
examples/.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
|
*.py.html
|
||||||
*.wasm
|
*.wasm
|
||||||
*.wat
|
*.wat
|
||||||
*.wat.html
|
*.wat.html
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<h1>Buffer</h1>
|
<h1>Buffer</h1>
|
||||||
|
|
||||||
<a href="index.html">List</a> - <a href="buffer.py">Source</a> - <a href="buffer.wat.html">WebAssembly</a>
|
<a href="index.html">List</a> - <a href="buffer.py.html">Source</a> - <a href="buffer.wat.html">WebAssembly</a>
|
||||||
|
|
||||||
<div style="white-space: pre;" id="results"></div>
|
<div style="white-space: pre;" id="results"></div>
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<h1>Fibonacci</h1>
|
<h1>Fibonacci</h1>
|
||||||
|
|
||||||
<a href="index.html">List</a> - <a href="fib.py">Source</a> - <a href="fib.wat.html">WebAssembly</a>
|
<a href="index.html">List</a> - <a href="fib.py.html">Source</a> - <a href="fib.wat.html">WebAssembly</a>
|
||||||
|
|
||||||
<div style="white-space: pre;" id="results"></div>
|
<div style="white-space: pre;" id="results"></div>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user