node.js style require script for client-side.