4

I have installed VS 2015 preview. I am trying to use the Hybrid App javascript template to create a new project. But I do not see any cordova.js in the project. Trying to learn following the sample given here [ http://msdn.microsoft.com/en-us/library/dn832630.aspx ] it refers to referencing the cordova.js file from root of the project. But there is no such file visible. Nor are there any instructions to explicitly import it. What am I missing?

The application does build and show up in Ripple OK. But i am trying to figure out where does cordova.js file reside.

Thanks.

Abhishek - MSFT
  • 1,598
  • 11
  • 17
SaurabhN
  • 43
  • 1
  • 5

1 Answers1

7

Cordova.js is added at the build time, after you build the project, you can find the cordova.js at \bld\Ripple\Android\Debug or \bld\Debug\platforms\android\assets\www (in case of Android similarly for different platform).

Therefore when you add reference to cordova.js in index.html, it is picked at run time. That's the reason your app is running fine even though Cordova.js is not present in Visual Studio project directory.

Abhishek - MSFT
  • 1,598
  • 11
  • 17
  • Maybe this should be a new question? Why does visual studio do this rather than just add it normally? And I guess how does it do it - is it in a template somewhere? – Jonny Jul 16 '15 at 06:54
  • I've just thought about this - there is actually a fair bit else going on. I'm guessing the cordova.js file is not there on purpose because it is not really a normal javascript project, it is running under the cordova platform, either on a device or under the ripple emulator. – Jonny Jul 16 '15 at 07:57