Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
57296ed303 |
@@ -5,11 +5,12 @@ build: clean
|
||||
mkdir -p dist
|
||||
cp wfa.js dist/wfa.js
|
||||
GOOS=js GOARCH=wasm CGO_ENABLED=0 go build -ldflags="-s -w" -trimpath -o dist/wfa.wasm .
|
||||
gzip dist/wfa.wasm
|
||||
|
||||
clean:
|
||||
@echo "======================== Cleaning Project ======================"
|
||||
go clean
|
||||
rm -f dist/wfa.wasm dist/wfa.js cover.prof cpu.prof mem.prof test.test
|
||||
rm -f dist/* cover.prof cpu.prof mem.prof test.test
|
||||
|
||||
test:
|
||||
@echo "======================== Running Tests ========================="
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
<script src="wfa.js" type="module"></script>
|
||||
<script type="module">
|
||||
import wfaInit from "./wfa.js";
|
||||
wfaInit("dist/wfa.wasm");
|
||||
wfaInit("dist/wfa.wasm.gz");
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
document.querySelector("#submit").addEventListener("click", () => {
|
||||
a = document.querySelector("#a").value
|
||||
|
||||
Reference in New Issue
Block a user