mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-07 08:53:25 +01:00
first aproach to compilation
This commit is contained in:
parent
4b1ed5f1ba
commit
89e34a53c9
1 changed files with 51 additions and 0 deletions
51
build/build.sh
Executable file
51
build/build.sh
Executable file
|
|
@ -0,0 +1,51 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
git rev-parse --short HEAD #make sure git in place
|
||||
|
||||
cd `dirname "$0"`
|
||||
|
||||
mkdir -p out
|
||||
rm -rf out/*
|
||||
|
||||
java -jar compiler.jar \
|
||||
--js_output_file out/app.js \
|
||||
--jscomp_off externsValidation \
|
||||
--compilation_level ADVANCED_OPTIMIZATIONS \
|
||||
--externs ../web/lib/jquery-2.1.0.min.js \
|
||||
--externs ../web/lib/numeric-1.2.6.js \
|
||||
--externs ../web/lib/diff_match_patch.js \
|
||||
../web/app/sketcher/canvas.js \
|
||||
../web/app/sketcher/io.js \
|
||||
../web/app/sketcher/history.js \
|
||||
../web/app/sketcher/shapes/arc.js \
|
||||
../web/app/sketcher/shapes/circle.js \
|
||||
../web/app/sketcher/shapes/segment.js \
|
||||
../web/app/sketcher/shapes/dim.js \
|
||||
../web/app/sketcher/helpers.js \
|
||||
../web/app/math/vector.js \
|
||||
../web/app/math/math.js \
|
||||
../web/app/math/qr.js \
|
||||
../web/app/math/matrix.js \
|
||||
../web/app/math/optim.js \
|
||||
../web/app/math/noptim.js \
|
||||
../web/app/math/lm.js \
|
||||
../web/app/sketcher/constr/constraints.js \
|
||||
../web/app/sketcher/constr/solver.js \
|
||||
../web/app/sketcher/parametric.js \
|
||||
../web/app/sketcher/fetchers.js \
|
||||
../web/app/engine.js \
|
||||
../web/app/sketcher/main2d.js \
|
||||
../web/app/ui.js \
|
||||
../web/app/math/graph.js \
|
||||
../web/app/app-init.js
|
||||
|
||||
sed -n \
|
||||
'/<\!--\$\$\$javascript_start\$\$\$-->/{:a;N;/<\!--\$\$\$javascript_end\$\$\$-->/!ba;N;s|.*\n| <script src="app.js"></script>|};p' \
|
||||
../web/sketcher.html > out/sketcher.html
|
||||
|
||||
echo >> out/sketcher.html
|
||||
echo '<!-- R:' "`git rev-parse --short HEAD` -->" >> out/sketcher.html
|
||||
|
||||
#now make it work inside out dir
|
||||
ln -sf ../../web/lib/ out/lib
|
||||
ln -sf ../../web/img/ out/img
|
||||
Loading…
Reference in a new issue