mirror of
https://github.com/zgs225/cliproxy-plugin-commandcode.git
synced 2026-09-26 03:32:50 +08:00
build: pagecheck as standalone node script (inline escaping was fragile)
This commit is contained in:
@@ -7,15 +7,22 @@ else
|
||||
TARGET := commandcode.so
|
||||
endif
|
||||
|
||||
.PHONY: all build test clean lint
|
||||
.PHONY: all build test clean lint pagecheck
|
||||
|
||||
all: build
|
||||
all: build pagecheck
|
||||
|
||||
build:
|
||||
CGO_ENABLED=1 go build -buildmode=c-shared -o $(TARGET) main.go
|
||||
|
||||
# Extract embedded JS from quota_page.go and syntax-check it with node.
|
||||
# Guards against parse-time SyntaxErrors (e.g. duplicate const) that break
|
||||
# the whole resource page; Go substring tests cannot catch these.
|
||||
pagecheck:
|
||||
@node scripts/pagecheck.js
|
||||
|
||||
test:
|
||||
go test -v -race ./...
|
||||
$(MAKE) pagecheck
|
||||
|
||||
clean:
|
||||
rm -f commandcode.dylib commandcode.so commandcode.dll commandcode.h
|
||||
|
||||
Reference in New Issue
Block a user