Forked from amitthk/makefile for npm build angular 2 app
Created
April 13, 2023 07:45
-
-
Save 16892434/a0e8dd0fe8186799a22d14e1a75be0bb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_version:=$(shell node -v) | |
npm_version:=$(shell npm -v) | |
timeStamp:=$(shell date +%Y%m%d%H%M%S) | |
.PHONY: install build archive test clean | |
show: | |
@ echo Timestamp: "$(timeStamp)" | |
@ echo Node Version: $(node_version) | |
@ echo npm_version: $(npm_version) | |
install: | |
@ npm install | |
build: | |
echo "building in production mode" | |
@ npm run build --prod | |
archive: | |
@ tar -czvf "dosetup-$(timeStamp).tar.gz" dist | |
test: | |
echo "test the app" | |
@ npm run test | |
clean: | |
echo "cleaning the dist directory" | |
@ rm -rf dist | |
@ rm -rf dist.tar.gz | |
INFO := @bash -c '\ | |
printf $(YELLOW); \ | |
echo "=> $$1"; \ | |
printf $(NC)' SOME_VALUE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment