Skip to content

Commit fd20930

Browse files
committed
Add makefile
1 parent 269a374 commit fd20930

File tree

4 files changed

+32
-1
lines changed

4 files changed

+32
-1
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
*~
33
/lcp-decrypt
44
/.direnv
5+
/build

Makefile

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.PHONY: format lint build-web
2+
3+
format:
4+
go fmt ./...
5+
biome format ./pkg/wasm
6+
7+
lint:
8+
go vet ./...
9+
biome lint ./pkg/wasm
10+
11+
build-web:
12+
mkdir -p build
13+
tinygo build -o build/lcp.wasm -target wasm ./pkg/wasm/wasm.go
14+
cp pkg/wasm/{index.html,main.js,styles.css} $$(tinygo env TINYGOROOT)/targets/wasm_exec.js ./build/

biome.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.7.3/schema.json",
3+
"formatter": {
4+
"enabled": true,
5+
"indentStyle": "space"
6+
},
7+
"organizeImports": {
8+
"enabled": true
9+
},
10+
"linter": {
11+
"enabled": true,
12+
"rules": {
13+
"recommended": true
14+
}
15+
}
16+
}

flake.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
{
2424
devShells.default = pkgs.mkShell {
2525
buildInputs = [
26-
# backend
26+
pkgs.biome
2727
pkgs.go
2828
pkgs.gopls
2929
pkgs.tinygo

0 commit comments

Comments
 (0)