# Build the collaboration plugin.

echo "Compiling statechart..."

INPUTFILE=src/collab/client/statechart_src/client_statechart.xml
OUTPUTFILE=src/collab/client/client_compiled.js

echo "Transforming $INPUTFILE to $OUTPUTFILE"

python -m sccd.compiler.sccdc -l nodejs -p eventloop -o $OUTPUTFILE $INPUTFILE


echo "Browserify plugin..."

INPUTFILE=src/collab/client/plugin.js
OUTPUTFILE=src/main/webapp/myPlugins/collab.js

echo "Transforming $INPUTFILE to $OUTPUTFILE"

browserify $INPUTFILE > $OUTPUTFILE # Put result in 'myPlugins' folder of webapp
