Annotation of loncom/html/adm/LC_math_editor/build.sh, revision 1.1
1.1 ! damieng 1: #!/bin/bash
! 2:
! 3: # this builds dist/LC_math_editor.min.js using google closure compiler with compressjs.
! 4: # It must be run in the math_editor directory.
! 5:
! 6: cd "$(dirname "$0")"
! 7: mkdir -p dist
! 8: tmp=$(mktemp)
! 9: cat <<% >$tmp
! 10: "use strict";
! 11: var LCMATH = function () {
! 12: %
! 13: cat src/*.js >>$tmp
! 14: cat <<% >>$tmp
! 15: return({
! 16: "Definitions": Definitions,
! 17: "ENode": ENode,
! 18: "Operator": Operator,
! 19: "ParseException": ParseException,
! 20: "Parser": Parser,
! 21: "initEditors": initEditors
! 22: });
! 23: }();
! 24: %
! 25:
! 26: NEWFILE="c`date +"%d%m%y"`.js"
! 27: /bin/sh ../../../build/compressjs.sh -strict $tmp
! 28: mv "$NEWFILE" ./dist/LC_math_editor.min.js
! 29: rm -f $tmp
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>