turn lib into to require.js module.