NPM ?= npm DEPLOY_API_PORT ?= 29200 export DEPLOY_API_PORT .PHONY: build up serve # `build` 生成生产环境 dist,等价于 npm run build。 build: $(NPM) run build # `up` 一键构建并启动 deploy server,同时托管 dist 和 /deploy/api/*。 up: build $(NPM) run deploy:serve # `serve` 直接使用已有 dist 启动 deploy server。 serve: $(NPM) run deploy:serve