JS to be a module and Cordova .api. fix