Annotation of modules/damieng/graphical_editor/loncapa_daxe/build.sh, revision 1.4
1.1 damieng 1: #!/bin/sh
1.2 damieng 2:
3: # Create a distribution that can run in any browser, without the source code.
4: # Once the dist directory is on a web server, Daxe can be launched with a URL like
5: # http://localhost/dist/daxe.html?config=config/loncapa_config.xml
6:
7: # reset the dist directory
8:
9: rm -rf dist
10: mkdir dist
11:
12:
1.4 ! damieng 13: # get Daxe latest version from github
! 14:
! 15: pub upgrade daxe
! 16:
! 17:
1.2 damieng 18: # compile LON-CAPA Daxe
19:
1.1 damieng 20: # NOTE: dart2js is in dart-sdk/bin, which should be on the PATH
1.2 damieng 21: dart2js --minify --out=dist/loncapa_daxe.min.js web/loncapa_daxe.dart
22: rm dist/*.js.map dist/*.deps
23:
24:
1.4 ! damieng 25: # copy Daxe resource files
1.2 damieng 26:
27: mkdir -p dist/packages/daxe
28: # note the / at the end of the paths, it copies only the contents
1.4 ! damieng 29: rsync -a packages/daxe/ dist/packages/daxe/ --exclude CVS --exclude '*.dart' --exclude packages --exclude src
1.2 damieng 30:
31:
32: # copy LON-CAPA Daxe files
33:
34: cp daxe.html dist/
35:
1.3 damieng 36: rsync -a web/ dist/ --exclude CVS --exclude '*.dart' --exclude packages --exclude tests --exclude nodes --exclude '*.html' --exclude 'XHTML_config.xml' --exclude 'xhtml1-strict.xsd' --exclude 'jsme'
1.2 damieng 37:
38:
1.3 damieng 39: # extract JSME
40:
41: unzip -d dist 'JSME_2015-03-03_xsiframe.zip'
42: mv 'dist/JSME_2015-03-03_xsiframe/jsme' dist/
43: rm -r 'dist/JSME_2015-03-03_xsiframe'
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>