File: build_js.sh

package info (click to toggle)
pdf2htmlex 0.14.6%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,408 kB
  • ctags: 892
  • sloc: cpp: 6,278; python: 462; ansic: 411; sh: 34; makefile: 16
file content (21 lines) | stat: -rwxr-xr-x 610 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh -ex
# Compile and optimize JS code
# Copyright 2013 Lu Wang <coolwanglu@gmail.com>

# To enable closure-compiler, you need to install and configure JAVA environment
# Read 3rdparty/closure-compiler/README for details


BASEDIR=$(dirname $0)
INPUT="$BASEDIR/pdf2htmlEX.js"
OUTPUT_FN="pdf2htmlEX.min.js"
OUTPUT="$BASEDIR/$OUTPUT_FN"

echo "Building $OUTPUT_FN with closure-compiler..."
closure-compiler \
     --compilation_level SIMPLE_OPTIMIZATIONS \
     --warning_level VERBOSE \
     --output_wrapper "(function(){%output%})();" \
     --js "$INPUT" \
     --js_output_file "$OUTPUT"
echo 'Done.'