generate JS lib for browser  #27