Skip to content

Commit

Permalink
Merge pull request #45 from zytzagoo/dist-file-in-repo
Browse files Browse the repository at this point in the history
place .min.js file in dist/ + link to it from tests/demo-minified.html
  • Loading branch information
zytzagoo authored Jan 13, 2017
2 parents 0ce51ba + c189e2f commit 2fdca8b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,21 @@ MINILICENSE = "/*! (C) $(TITLE) v$(VERSION) - MIT License - $(HOMEPAGE) */"

.PHONY: all clean license

all: src/cookiebanner.min.js
all: dist/cookiebanner.min.js

lint: src/cookiebanner.js
$(LINT) $<

src/cookiebanner.min.js: src/cookiebanner.js
dist/cookiebanner.min.js: src/cookiebanner.js
echo $(MINILICENSE) > $@
$(MINIFY) < $< >> $@

clean:
rm -f dist/cookiebanner.min.js
rm -f src/cookiebanner.min.js

publish: src/cookiebanner.min.js
$(UPLOAD) src/cookiebanner.min.js s3://cookiebanner.eu/js/cookiebanner.min.js
publish: dist/cookiebanner.min.js
$(UPLOAD) dist/cookiebanner.min.js s3://cookiebanner.eu/js/cookiebanner.min.js

test:
$(MAKE) lint
Expand Down
2 changes: 2 additions & 0 deletions dist/cookiebanner.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/demo-minified.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<body>
<h1 id="qunit-header">cookie-banner simple demo (minified .js)</h1>
<script type="text/javascript" id="cookiebanner"
src="../src/cookiebanner.min.js"
src="../dist/cookiebanner.min.js"
data-height="20px"
data-close-text="NOooo!"
data-message="We use cookies to improve your browsing experience.">
Expand Down

0 comments on commit 2fdca8b

Please sign in to comment.