Skip to content

Commit e440947

Browse files
authored
feat(web): init nextjs (#9)
* feat: [WIP] crossplane args error * fix: wasm * fix(ast): patch * feat(web): minimal * feat(web): MVP
1 parent ee09434 commit e440947

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+6151
-1381
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ bin
99
# misc
1010
dump.json
1111
wasm_exec.js
12-
*.log
12+
*.log
13+
.next
14+
next-env.d.ts

.vscode/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,8 @@
66
"go.testEnvVars": {
77
"GOARCH":"wasm",
88
"GOOS":"js",
9-
}
9+
},
10+
"eslint.workingDirectories": [
11+
"./web"
12+
]
1013
}

Makefile

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
GO_ROOT=$(shell go env GOROOT)
2+
13
.PHONY: build
24
build:
35
go build -o ./bin/go-ngx-config ./cmd/go-ngx-config/*.go
46

57
.PHONY: build-wasm
68
build-wasm:
7-
GOOS=js GOARCH=wasm go build -o ./bin/go-ngx-config-parser.wasm ./cmd/go-ngx-config-wasm/main.go
9+
GOOS=js GOARCH=wasm go build -o ./bin/go-ngx-config-parser.wasm ./cmd/go-ngx-config-wasm/*.go
810

911
.PHONY: clean-wasm-dev
1012
clean-wasm-dev:
@@ -13,6 +15,12 @@ clean-wasm-dev:
1315

1416
.PHONY: serve-wasm-dev
1517
serve-wasm-dev: clean-wasm-dev build-wasm
16-
bash -c "cp /usr/local/Cellar/go@1.14/1.14.15/libexec/misc/wasm/wasm_exec.js ./examples/wasm/"
18+
bash -c "cp ${GO_ROOT}/misc/wasm/wasm_exec.js ./examples/wasm/"
1719
@cp ./bin/go-ngx-config-parser.wasm ./examples/wasm/
18-
pnpm serve --filter=wasm-example
20+
pnpm serve --filter=wasm-example
21+
22+
.PHONY: serve-web
23+
serve-dev-web: build-wasm
24+
bash -c "cp ${GO_ROOT}/misc/wasm/wasm_exec.js ./web/public/"
25+
@cp ./bin/go-ngx-config-parser.wasm ./web/public
26+
pnpm dev --filter=web

0 commit comments

Comments
 (0)