Files
KaTeX/Makefile
Emily Eisenberg 3b69354fd6 Improve the makefile
Summary: Make the makefile copy files into the correct places in all
three repos. (note, the khan-exercises location might change since we
don't want to have two copies of things, but it's where it is in my
setup right now)

Auditors: alpert
2013-07-26 14:10:35 -07:00

35 lines
874 B
Makefile

.PHONY: build copy serve clean
build: build/katex.js
compress: build/katex.min.js
@printf "Minified, gzipped size: "
@gzip -c $^ | wc -c
build/katex.js: katex.js $(wildcard *.js)
./node_modules/.bin/browserify $< --standalone katex > $@
build/katex.min.js: build/katex.js
uglifyjs --mangle < $< > $@
copy: copy-webapp copy-perseus copy-khan-exercises
copy-webapp: build
cp build/katex.js ../webapp/javascript/katex-package/
cp static/katex.css static/fonts/fonts.css \
../webapp/stylesheets/katex-package
cp static/fonts/*.ttf static/fonts/*.eot static/fonts/*.woff \
../webapp/fonts/
copy-perseus: build
cp -R build/katex.js static/katex.css static/fonts ../perseus/lib/katex/
copy-khan-exercises: build
cp build/katex.js ../exercises/utils/katex.js
cp -R static/katex.css static/fonts ../exercises/css/
serve:
node server.js
clean:
rm -rf build/*