From c52458df0a456d81e050cfc72d04c3b2241b6948 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sat, 11 Nov 2017 16:34:29 +0000 Subject: [PATCH] Add speedpack to compress static files --- .circleci/config.yml | 2 +- Makefile | 4 ++++ package.json | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fe1a2ba..df83610 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,7 @@ jobs: command: npm install - run: name: Build site - command: make build + command: make release - run: name: Run Tests command: make test diff --git a/Makefile b/Makefile index 6cef7ba..9ffc1fe 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,10 @@ STATIC_BUILD=$(BASEDIR)/static/build OUTPUT_DIR=$(BASEDIR)/public +release: build + $(NODE_BIN)/speedpack $(OUTPUT_DIR) -o $(OUTPUT_DIR) + + build: install rm -rf $(OUTPUT_DIR) rm -rf $(STATIC_BUILD) diff --git a/package.json b/package.json index d2672ad..8c0c764 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "lg-thumbnail": "1.0.3", "lightgallery": "1.4.0", "plyr": "2.0.17", + "speedpack": "0.1.4", "tstatic": "1.1.0" } }