# HG changeset patch # User Dustin Demuth # Date 1443687846 -7200 # Node ID 94d8ea3b98ba548eb15de1d547be7d74f542d0ff # Parent 1e2895bfa41051e30ab3562d7e6a31633e24d374 Added a simple build script, which will not work in every environment. You need to edit the path to sencha command in order tu run this script. diff -r 1e2895bfa410 -r 94d8ea3b98ba build.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/build.sh Thu Oct 01 10:24:06 2015 +0200 @@ -0,0 +1,39 @@ + +SENCHAPATH=~/bin/Sencha/Cmd/4.0.5.87/sencha +VNUMBER=$(grep Lada.clientVersion app.js | cut -d '=' -f 2 | cut -d "'" -f 2) +VERSION=lada-client-$VNUMBER + +# Minify +echo "Minifying...." +$SENCHAPATH --sdk-path extjs compile \ + --classpath=app,resources/lib/ext/upload,resources/lib/ext/i18n page \ + -yui -i index.html -o $VERSION/index.html + +# Copy additional files +# Extjs Styles +echo "Copying additional files...." + +mkdir --parents $VERSION/extjs/resources +cp -r extjs/resources/css $VERSION/extjs/resources +cp -r extjs/resources/ext-theme-gray $VERSION/extjs/resources + +# Additional resources +mkdir --parents $VERSION/resources/css +mkdir --parents $VERSION/resources/i18n +mkdir --parents $VERSION/resources/img +mkdir --parents $VERSION/resources/lib + +cp -r resources/css $VERSION/resources/ +cp -r resources/img $VERSION/resources/ +cp -r resources/i18n $VERSION/resources/ +cp -r resources/lib/Blob $VERSION/resources/lib/ +cp -r resources/lib/Blob.js-master $VERSION/resources/lib/ +cp -r resources/lib/FileSaver $VERSION/resources/lib/ +cp -r resources/lib/FileSaver.js-master $VERSION/resources/lib/ +cp -r resources/lib/OpenLayers $VERSION/resources/lib/ +cp -r resources/lib/openlayers-release-2.13.1 $VERSION/resources/lib/ + +echo "Compressing...." +tar -czf $VERSION.tgz $VERSION + +echo "Done here.\n\n"