FPGA_WebLab/.justfile

38 lines
842 B
Makefile
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@_show-dir:
echo "Current Working Directory:"
pwd
echo
# 清空构建文件
clean:
rm -rf "server/bin"
rm -rf "server/obj"
rm -rf "server.test/bin"
rm -rf "server.test/obj"
rm -rf "dist"
# 生成Restful API到网页客户端
gen-api:
cd server && dotnet run &
npx nswag openapi2tsclient /input:http://localhost:5000/swagger/v1/swagger.json /output:src/APIClient.ts
pkill server
# 构建服务器包含win与linux平台
[working-directory: "server"]
build-server: _show-dir
dotnet publish --self-contained false -t:PublishAllRids
# 运行服务器
[working-directory: "server"]
run-server: _show-dir
dotnet run
# 运行网页客户端
run-web:
npm run dev
# 运行测试用例测试服务器
[working-directory: "server.test"]
test-server: _show-dir
dotnet test --logger "console;verbosity=detailed"