From cbcc269be607cc964fbd69d179d8a0e8b8e4bffa Mon Sep 17 00:00:00 2001 From: Joris Date: Mon, 3 Feb 2020 18:28:50 +0100 Subject: Extract dom and number utilities to external files --- Makefile | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..21b2356 --- /dev/null +++ b/Makefile @@ -0,0 +1,45 @@ +BUILD_DIRECTORY = ".build" + +build: static/main.js + @echo "Building site" + zola build + +static/main.js: $(shell find src) + @echo "Building $@" +ifeq ($(DEV_MODE), true) + @tsc \ + --strict \ + --noUnusedLocals \ + --noUnusedParameters \ + --noImplicitReturns \ + --outDir $(BUILD_DIRECTORY) \ + --module es2015 \ + src/main.ts + @rollup \ + --input $(BUILD_DIRECTORY)/main.js \ + --file $@ \ + --format iife +else + @tsc \ + --strict \ + --noUnusedLocals \ + --noUnusedParameters \ + --noImplicitReturns \ + --outDir $(BUILD_DIRECTORY) \ + --module es2015 \ + src/main.ts + @rollup \ + --input $(BUILD_DIRECTORY)/main.js \ + --file $@ \ + --format iife + @terser $@ \ + --output $@ \ + --compress \ + --mangle +endif + +clean: + @echo "Cleaning" + @rm -rf $(BUILD_DIRECTORY) + @rm -rf public + @rm -f static/main.js -- cgit v1.2.3