From 517d15e40c4e0fdff2061bf291d434b253833044 Mon Sep 17 00:00:00 2001
From: Markin Igor <markin.io210@gmail.com>
Date: Wed, 7 Nov 2018 14:55:22 +0300
Subject: [PATCH] Made Makefile cleanup temporary files.

---
 Makefile              | 22 ++++++++++++----------
 javascript/.gitignore |  1 -
 2 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/Makefile b/Makefile
index ea41626..c934465 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 e403982..f06235c 100644
--- a/javascript/.gitignore
+++ b/javascript/.gitignore
@@ -1,3 +1,2 @@
 node_modules
 dist
-temp
-- 
GitLab