beautify basis.js source code if no pack mode
clean up code
fix throw replacing with -r flag
add output summary
fix ref properties for resource -> basis.resource replacement
improve -r flag