Rebuild cordova after change

Is there a way to recompile the corodova code after changing it locally. For example, I might need to build or edit a library and I want to be able to rebuild cordova without deleting the whole folder (lots of settings need to be input again after the project is killed and reset like that).

Or should I develop the cordova part somewhere else first?

Thanks.