diff --git a/Makefile b/Makefile index 94e5a16..347593a 100644 --- a/Makefile +++ b/Makefile @@ -26,12 +26,9 @@ static/katex/: @echo "> Katex downloaded" -build: build/pseudocode.js build/pseudocode.css +build: build/pseudocode.js build/pseudocode.css build/samples.html @echo "> Building succeeded" -build/pseudocode.min.js: build/pseudocode.js - $(UGLIFYJS) < $< > $@ - build/pseudocode.js: pseudocode.js $(wildcard src/*.js) @$(MAKE) --no-print-directory lint $(BROWSERIFY) $< --exclude katex --standalone pseudocode -o $@ @@ -43,27 +40,33 @@ lint: pseudocode.js $(wildcard src/*.js) watch-js: pseudocode.js $(wildcard src/*.js) $(WATCHIFY) $< --standalone pseudocode -o build/pseudocode.js -build/pseudocode.min.css: build/pseudocode.css - $(CLEANCSS) -o $@ $< - build/pseudocode.css: static/pseudocode.css cp static/pseudocode.css build/pseudocode.css +build/samples.html: static/samples.html.template + cp $< $@ + -release: build/pseudocode-js.tar.gz build/pseudocode-js.zip +release: build build/pseudocode-js.tar.gz build/pseudocode-js.zip @echo "> Release package generated" -RELEASE_DIR=pseudocode-$(VERSION)/ +RELEASE_DIR=pseudocode.js-$(VERSION)/ build/pseudocode-js.tar.gz: build/$(RELEASE_DIR) cd build && tar czf pseudocode-js.tar.gz $(RELEASE_DIR) build/pseudocode-js.zip: build/$(RELEASE_DIR) cd build && zip -rq pseudocode-js.zip $(RELEASE_DIR) -build/$(RELEASE_DIR): build/pseudocode.min.js build/pseudocode.min.css README.md +build/$(RELEASE_DIR): build/pseudocode.js build/pseudocode.min.js build/pseudocode.css build/pseudocode.min.css build/samples.html README.md mkdir -p build/$(RELEASE_DIR) cp -r $^ build/$(RELEASE_DIR) +build/pseudocode.min.js: build/pseudocode.js + $(UGLIFYJS) < $< > $@ + +build/pseudocode.min.css: build/pseudocode.css + $(CLEANCSS) -o $@ $< + clean: @rm -rf build/* diff --git a/static/test-suite.html b/static/samples.html.template similarity index 87% rename from static/test-suite.html rename to static/samples.html.template index b92a1e1..c163da8 100644 --- a/static/test-suite.html +++ b/static/samples.html.template @@ -2,13 +2,17 @@
-