diff --git a/TODO b/TODO index f818737..832202e 100644 --- a/TODO +++ b/TODO @@ -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 diff --git a/share/js_src/compile.sh b/share/js_src/compile.sh index ced9016..3867aca 100755 --- a/share/js_src/compile.sh +++ b/share/js_src/compile.sh @@ -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' && \ diff --git a/share/js_src/header.js b/share/js_src/header.js index 8735a81..c3c3895 100644 --- a/share/js_src/header.js +++ b/share/js_src/header.js @@ -1,3 +1,2 @@ -/* pdf2htmlEX.js * Copyright 2012,2013 Lu Wang 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 and other contributors * https://github.com/coolwanglu/pdf2htmlex * https://github.com/coolwanglu/pdf2htmlEX/blob/master/share/LICENSE */ +window['pdf2htmlEX'] = window['pdf2htmlEX'] || {};