improve compile.sh

This commit is contained in:
Lu Wang 2013-10-20 17:06:40 +08:00
parent 7856199461
commit ec130dba70
3 changed files with 4 additions and 7 deletions

1
TODO
View File

@ -1,3 +1,4 @@
annot for closure-compiler:https://developers.google.com/closure/compiler/docs/js-for-compiler#generics
pdf:mobile device
pdf:miui
tmp dir: use pid

View File

@ -10,10 +10,7 @@ BASEDIR=$(dirname $0)
OUTPUT="$BASEDIR/../pdf2htmlEX.js"
(echo 'Building pdf2htmlEX.js with closure-compiler...' && \
tmpfile=$(mktemp 2>/dev/null) && \
java -jar "$BASEDIR/../../3rdparty/closure-compiler/compiler.jar" --compilation_level ADVANCED_OPTIMIZATIONS --process_jquery_primitives --externs "$BASEDIR/../jquery.js" --js "$BASEDIR/css_class_names.js" --js "$BASEDIR/viewer.js" > "$tmpfile" 2>/dev/null && \
cat "$BASEDIR/header.js" "$tmpfile" > "$OUTPUT" && \
rm -f -- "$tmpfile" && \
java -jar "$BASEDIR/../../3rdparty/closure-compiler/compiler.jar" --compilation_level ADVANCED_OPTIMIZATIONS --process_jquery_primitives --externs "$BASEDIR/../jquery.js" --js "$BASEDIR/header.js" --js "$BASEDIR/css_class_names.js" --js "$BASEDIR/viewer.js" > "$OUTPUT" 2>/dev/null && \
echo 'Done.') || \
(echo 'Failed. Read `3rdparty/closure-compiler/README` for more detail.' && \
echo 'Fall back to naive concatenation' && \

View File

@ -1,3 +1,2 @@
/* pdf2htmlEX.js * Copyright 2012,2013 Lu Wang <coolwanglu@gmail.com> and other contributors * https://github.com/coolwanglu/pdf2htmlex * https://github.com/coolwanglu/pdf2htmlEX/blob/master/share/LICENSE */
/*! Depends on jQuery v@1.8.1 jquery.com | jquery.org/license */
window.pdf2htmlEX = window.pdf2htmlEX || {};
/** @license pdf2htmlEX.js * Copyright 2012,2013 Lu Wang <coolwanglu@gmail.com> and other contributors * https://github.com/coolwanglu/pdf2htmlex * https://github.com/coolwanglu/pdf2htmlEX/blob/master/share/LICENSE */
window['pdf2htmlEX'] = window['pdf2htmlEX'] || {};