Skip to content

Commit

Permalink
no, compression should be local.
Browse files Browse the repository at this point in the history
  • Loading branch information
mnot committed Oct 17, 2018
1 parent 7550526 commit b5652d4
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions Makefile
@@ -1,7 +1,5 @@
PYTHON=python3
PYTHONPATH=./
GZIP = gzip
BROTLI = brotli

BOWER = src/bower_components
JSFILES = $(BOWER)/jquery/dist/jquery.js $(BOWER)/jquery-hoverIntent/jquery.hoverIntent.js $(BOWER)/google-code-prettify/src/prettify.js src/red_script.js src/red_popup.js src/red_req_headers.js
Expand Down Expand Up @@ -83,12 +81,8 @@ redbot/message/headers/%.py:

## assets

COMPRESS_TARGETS = redbot/assets/script.js redbot/assets/style.css
COMPRESS_FILES = $(addsuffix .gzip, $(COMPRESS_TARGETS))
COMPRESS_FILES += $(addsuffix .brotli, $(COMPRESS_TARGETS))

.PHONY: redbot/assets
redbot/assets: $(COMPRESS_TARGETS) $(COMPRESS_FILES)
redbot/assets: redbot/assets/script.js redbot/assets/style.css

redbot/assets/script.js: $(JSFILES)
closure-compiler --create_source_map $@.map --js_output_file $@ $(JSFILES)
Expand All @@ -103,13 +97,3 @@ redbot/assets/style.css: $(CSSFILES)
.PHONY: clean-assets
clean-assets:
rm -f redbot/assets/script.js redbot/assets/script.js.map redbot/assets/style.css

## compress

%.gzip : %
$(GZIP) -cn9 $< > $@

%.brotli : %
$(BROTLI) --force --output=$@ $<
chmod a+r $@

Binary file removed redbot/assets/script.js.brotli
Binary file not shown.
Binary file removed redbot/assets/script.js.gzip
Binary file not shown.
Binary file removed redbot/assets/style.css.brotli
Binary file not shown.
Binary file removed redbot/assets/style.css.gzip
Binary file not shown.

0 comments on commit b5652d4

Please sign in to comment.