resource engine for javascript