compile cache class to JS
set the compiled js class to be main