Skip to content
Snippets Groups Projects
Commit a56bde53 authored by Alvaro Cabrera Durán's avatar Alvaro Cabrera Durán
Browse files

Copy public/ on dist

parent 450cbfb7
No related branches found
No related tags found
No related merge requests found
...@@ -23,27 +23,28 @@ endef ...@@ -23,27 +23,28 @@ endef
# display all targets-with-help in this file # display all targets-with-help in this file
?: Makefile ?: Makefile
@awk -F':.*?##' '/^[a-z\\%!:-]+:.*##/{gsub("%","*",$$1);gsub("\\\\",":*",$$1);printf "\033[36m%8s\033[0m %s\n",$$1,$$2}' $< @awk -F':.*?##' '/^[a-z\\%!:-]+:.*##/{gsub("%","*",$$1);gsub("\\\\",":*",$$1);printf "\033[36m%8s\033[0m %s\n",$$1,$$2}' $<
dist: deps ## Build artifact for production dist: deps ## Build artifact for production
@(git worktree remove $(src) --force > /dev/null 2>&1) || true @(git worktree remove $(src) --force > /dev/null 2>&1) || true
@git worktree add $(src) $(target) @git worktree add $(src) $(target)
@cd $(src) && rm -rf * # && git checkout -- vendor @cd $(src) && rm -rf *
@npm run build @cp -r public/* build
@npm run build
clean: ## Remove cache and generated artifacts clean: ## Remove cache and generated artifacts
@$(call iif,rm -r $(src) dist,Built artifacts were deleted,Artifacts already deleted) @$(call iif,rm -r $(src) dist,Built artifacts were deleted,Artifacts already deleted)
@$(call iif,unlink .tarima,Cache file was deleted,Cache file already deleted) @$(call iif,unlink .tarima,Cache file was deleted,Cache file already deleted)
deploy: $(src) ## Push built artifacts to github! deploy: $(src) ## Push built artifacts to github!
@cd $(src) && git add . && git commit -m "$(message)" @cd $(src) && git add . && git commit -m "$(message)"
@git push origin $(target) -f @git push origin $(target) -f
deps: ## Check for installed dependencies deps: ## Check for installed dependencies
@(((ls node_modules | grep .) > /dev/null 2>&1) || npm i) || true @(((ls node_modules | grep .) > /dev/null 2>&1) || npm i) || true
purge: clean ## Remove all from node_modules/* purge: clean ## Remove all from node_modules/*
@printf "\r* Removing all dependencies... " @printf "\r* Removing all dependencies... "
@rm -rf node_modules/.{bin,cache} @rm -rf node_modules/.{bin,cache}
@rm -rf node_modules/* @rm -rf node_modules/*
@echo "OK" @echo "OK"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment