guidelines to handle web modules with npm.js and require.js