Preparation for native app build.

This commit is contained in:
genxium
2023-01-22 23:05:32 +08:00
parent b5b43bb596
commit 58e60a789f
11 changed files with 45 additions and 32 deletions

View File

@@ -4,24 +4,25 @@ all: help
## Available proxies for downloading go modules are listed in "https://github.com/golang/go/wiki/Modules#how-do-i-use-vendoring-with-modules-is-vendoring-going-away".
#GOPROXY=https://mirrors.aliyun.com/goproxy
GOPROXY=https://goproxy.io
DST=../frontend/assets/scripts/modules
serve:
gopherjs serve $(PROJECTNAME)
clean:
gopherjs clean
rm -f ../frontend/assets/plugin_scripts/jsexport.js
#rm -f ../frontend/assets/plugin_scripts/jsexport.js.map
rm -f $(DST)/jsexport.js
#rm -f $(DST)/jsexport.js.map
build: clean
gopherjs build $(PROJECTNAME)
mv ./jsexport.js ../frontend/assets/plugin_scripts/
#mv ./jsexport.js.map ../frontend/assets/plugin_scripts/
mv ./jsexport.js $(DST)/
#mv ./jsexport.js.map $(DST)/
build-min: clean
gopherjs build -m $(PROJECTNAME)
mv ./jsexport.js ../frontend/assets/plugin_scripts/
#mv ./jsexport.js.map ../frontend/assets/plugin_scripts/
mv ./jsexport.js $(DST)/
#mv ./jsexport.js.map $(DST)/
.PHONY: help