phoneGap启动 - 我们需要所有这些文件吗? [英] phoneGap startup - do we need all those files?

查看:176
本文介绍了phoneGap启动 - 我们需要所有这些文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,我刚刚开始使用phoneGap的iOS,我注意到在www目录,有很多文件,如

Alright, I am just getting started with phoneGap for iOS and I am noticing in the www directory that there are plenty of files, such as

spec/helper.js
spec/index.js
jasmine
cordova.js
etc.

所有这些东西真的需要为了使它一切正常吗?
另外,我在index.js中注意到,在文件的开头,它正在创建一个app对象:

Are all those things really needed in order to have it all working? Also, I noticed in "index.js" that, at the beginning of the file, it is creating an app object:

var app = { ... };

并将所有代码放在其中;

and puts all the code inside it;

这也是必要的,以绑定事件?喜欢deviceready或其他?

Is this also necessary in order to bind the events? Like deviceready or others?

提前感谢。

推荐答案

cordova js所需的唯一js文件。当您运行phonegap创建脚本时,这是自动生成的。

The cordova js the only js file needed. This is autogenerated when you ran the phonegap create script.

index.js包含如何绑定到deviceready事件的示例代码。它可以作为您的js代码的开始。

index.js contains sample code on how to bind to the deviceready event. It can serve as a start for your js code.

spec文件夹和spec.html是用于javascript测试使用 Jasmine ,一个用于Javascript的BDD测试框架。

The spec folder and spec.html are for javascript testing using Jasmine, a BDD testing framework for Javascript.

这篇关于phoneGap启动 - 我们需要所有这些文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆