diff --git a/Makefile b/Makefile index ea41626e4d4e2437944f19caf2e0807202aede96..c934465510f21b4b333d3b8fbc53b5fe5a835030 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,11 @@ SERVER_OUT := "bin/app" PKG := "code.vereign.com/code/vcl" SERVER_PKG_BUILD := "${PKG}" +IFRAME_LIB_LOCATION := "javascript/temp" -.PHONY: all build clean run +.PHONY: all build run clean -all: build run bundle-libs +all: build run bundle-libs clean dep: ## Get the dependencies dep ensure @@ -12,18 +13,19 @@ dep: ## Get the dependencies build: dep ## Build the binary file for app @go build -i -v -o $(SERVER_OUT) $(SERVER_PKG_BUILD) -clean: ## Remove previous builds - @rm $(SERVER_OUT) - -help: ## Display this help screen - @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' - -run: build ## Run app +run: build ## Run app to build iframe lib containing Restful API endpoints ./bin/app -bundle-libs: ## Builds JS bundles +bundle-libs: run ## Builds JS bundles cd javascript && yarn install && yarn build +clean: bundle-libs ## Remove previous builds + @rm $(SERVER_OUT) + @rm -rf $(IFRAME_LIB_LOCATION) + +help: ## Display this help screen + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' + fresh: rm -rf ./vendor rm -rf ./Gopkg.lock \ No newline at end of file diff --git a/javascript/.gitignore b/javascript/.gitignore index e40398241a87ca2dab9425550a659683e6f15c6d..f06235c460c2de3d97efc8371125594b7b761b08 100644 --- a/javascript/.gitignore +++ b/javascript/.gitignore @@ -1,3 +1,2 @@ node_modules dist -temp