--- modules/damieng/graphical_editor/loncapa_daxe/build.sh 2015/04/17 15:35:06 1.1 +++ modules/damieng/graphical_editor/loncapa_daxe/build.sh 2015/05/07 15:38:52 1.2 @@ -1,5 +1,33 @@ #!/bin/sh + +# Create a distribution that can run in any browser, without the source code. +# Once the dist directory is on a web server, Daxe can be launched with a URL like +# http://localhost/dist/daxe.html?config=config/loncapa_config.xml + +# reset the dist directory + +rm -rf dist +mkdir dist + + +# compile LON-CAPA Daxe + # NOTE: dart2js is in dart-sdk/bin, which should be on the PATH -dart2js --minify --out=loncapa_daxe.min.dart.js web/loncapa_daxe.dart -dart2js --output-type=dart --minify --out=loncapa_daxe.min.dart web/loncapa_daxe.dart -rm *.js.map *.deps +dart2js --minify --out=dist/loncapa_daxe.min.js web/loncapa_daxe.dart +rm dist/*.js.map dist/*.deps + + +# copy Daxe files + +mkdir -p dist/packages/daxe +# note the / at the end of the paths, it copies only the contents +rsync -a ../daxe/lib/ dist/packages/daxe/ --exclude CVS --exclude '*.dart' --exclude packages --exclude src + + +# copy LON-CAPA Daxe files + +cp daxe.html dist/ + +rsync -a web/ dist/ --exclude CVS --exclude '*.dart' --exclude packages --exclude tests --exclude nodes --exclude '*.html' --exclude 'XHTML_config.xml' --exclude 'xhtml1-strict.xsd' + +