Cordova.js in the Getting Started Tutorial

I’m going through the Getting Started tutorial and I’m not seeing cordova.js created by the cordova command line utility.

I also don’t see it when I use the ionic command line utility (ionic start …) to generate a project.

Am I missing something? Do I have to go find this at the Apache GitHub repo:

When you run cordova platform add ios and then cordova build ios, you should get a cordova.js added in your www folder.

Does running both of the cordova commands solve the problem?

I see what happens.

They are dropped in the project/platforms/ios/www and project/platforms/android/assets/www folders.

I’m looking at my project/www folder, which contains much of my other source files (ionic, angular, etc.) )and expecting to see it there.

I mean my index.html refers to it there at the top level:
… src=“cordova.js” …


I did not have the same luck!
When I run cordova platform add ios and after cordova build ios, even the commands success, I don’t see the file cordova.js on www or on root directory of my project.

duly-imac:aaclient eldontc$ ls
LICENSE		merges		platforms	www	node_modules	plugins
duly-imac:aaclient eldontc$ sudo cordova platform add ios
Platform ios already added
duly-imac:aaclient eldontc$ sudo cordova build ios
Generating config.xml from defaults for platform "ios"
Preparing ios project
Compiling app on platform "ios" via command "/dados-usr/trabalho/aaclient/aaclient/platforms/ios/cordova/build" 
Platform "ios" compiled successfully.
duly-imac:aaclient eldontc$ ls
LICENSE		merges		platforms	www	node_modules	plugins
duly-imac:aaclient eldontc$ cd www
duly-imac:www eldontc$ ls
config.xml	img		js		res
css		index.html	lib		templates
duly-imac:www eldontc$ cd js
duly-imac:js eldontc$ ls
app.js		controllers.js	services.js

First as a qualifier, I’m just a newbie on this stuff, but what I found was that it will not be put in your www folder. It will be deep within the platform folder paths:


So check there first.

I might add, if you can run the cordova stater app, both on emulator and device, you don’t really need to give a look at the Cordova.js :wink:
Cordova did a really good job in the latest versions, separating the ‘www work directory’ and the build folders, this is why you never see anything platform-related in the www work directory.

Thank you!
I found the file on /platforms/ios/www

The funny thing is that the seed project, in the index.html file, point to cordova.js to root project directory.

it’s normal :wink: