Skip to content
Browse files

Add compressed HTML distributable to make dist target.

  • Loading branch information...
1 parent adef7f5 commit 449dbc218ae55c8c8f2e92b2b0f49fea62bb8167 @stephank committed Jun 6, 2010
Showing with 15 additions and 4 deletions.
  1. +1 −0 .gitignore
  2. +13 −3 Makefile
  3. 0 stylesheet.css → arashi.css
  4. +1 −1 arashi.html
View
1 .gitignore
@@ -3,4 +3,5 @@
*.pyo
dist/arashi.js
dist/arashi.css
+dist/arashi.html
View
16 Makefile
@@ -3,6 +3,7 @@ JSLINT ?= ../jslint.js
JAVA ?= java
YUICOMP ?= ../yuicompressor.jar
+HTMLCOMP ?= ../htmlcompressor.jar
JSFILES := $(shell find src -iname '*.js' | grep -v '.lint.js')
@@ -13,10 +14,10 @@ usage:
@echo " lint: Run JSLint on all JavaScript source files."
@echo " clean: Remove any files created by the above."
-dist: dist/arashi.js dist/arashi.css
+dist: dist/arashi.html dist/arashi.js dist/arashi.css
clean:
- -rm -f dist/arashi.js dist/arashi.css
+ -rm -f dist/arashi.html dist/arashi.js dist/arashi.css
-find src -iname '*.lint.js' | xargs rm -f
lint:
@@ -28,12 +29,21 @@ lint:
echo; \
done
+dist/arashi.html:
+ sed arashi.html \
+ -e '/script src="src\//d' \
+ -e 's/<\/head>/<script src="arashi.js"><\/script><\/head>/' \
+ | ${JAVA} -jar ${HTMLCOMP} \
+ --compress-js --compress-css \
+ --remove-intertag-spaces --remove-quotes \
+ > dist/arashi.html
+
dist/arashi.js:
cat util/dist.head.js ${JSFILES} \
| ${JAVA} -jar ${YUICOMP} --type js \
> dist/arashi.js
dist/arashi.css:
- ${JAVA} -jar ${YUICOMP} --type css -o dist/arashi.css stylesheet.css
+ ${JAVA} -jar ${YUICOMP} --type css -o dist/arashi.css arashi.css
.PHONY: usage dist clean lint
View
0 stylesheet.css → arashi.css
File renamed without changes.
View
2 arashi.html
@@ -3,7 +3,7 @@
<head>
<title>Project ARASHI</title>
-<link rel=stylesheet media=screen href="stylesheet.css">
+<link rel=stylesheet media=screen href="arashi.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.js"></script>
<script src="src/globals.js"></script>

0 comments on commit 449dbc2

Please sign in to comment.
Something went wrong with that request. Please try again.