Generate RequireJS-friendly wrapper.