add requirejs plug and reformat JS