diff --git a/Makefile b/Makefile index 183c1fab..0eadcc4e 100644 --- a/Makefile +++ b/Makefile @@ -8,19 +8,21 @@ publish: .PHONY: clean clean: - @rm -rf static dozzle + @rm -rf static + @go clean -static: $(shell find assets -type f) -ifdef SKIP_ASSET +.PHONY: static +static: + @yarn build + +.PHONY: fake_static +fake_static: @echo 'Skipping yarn build' @mkdir -p static - @touch static/index.html -else - yarn build -endif + @echo "yarn build was skipped" > static/index.html .PHONY: test -test: static +test: fake_static go test -cover ./... build: static diff --git a/package.json b/package.json index 242f9ae3..b1a4a386 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "watch": "npm-run-all -p watch:*", "watch:assets": "webpack --mode=development --watch", "watch:server": "reflex -c .reflex", + "predev": "make fake_static", "dev": "npm-run-all -p dev-server watch:server", "dev-server": "webpack serve --mode=development", "prebuild": "yarn clean",