As I understand we give PhoneGap Build the ‘www’ folder with our Html, Css and JS (especially cordova.js) and it returns us packages for necessary platforms.
But as far as I know there are different cordova.js files for different platforms. So how PhoneGap Build prepares these packages? Does it replace cordova.js for every platform?
Yes, the Build process injects the correct *.js. In fact, you are warned not to include any phonegap.js files for this reason.