为什么有两个Cordova www文件夹? [英] Why are there two Cordova www folders?

查看:239
本文介绍了为什么有两个Cordova www文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是PhoneGap的初学者,我正在尝试了解有关www文件夹的一些信息。
我创建了一个只有iOS平台的项目。

I'm a beginner in PhoneGap and I'm trying to understand something about the www folders. I created a project with only an iOS platform.

我看到有两个www文件夹:

I saw that there are two www folders:


  • www

  • www在 platform / ios / 文件夹中

  • www in the root folder of the project
  • www in the platform/ios/ folder

如何使用它们?我应该只使用其中一个吗?

如何与其他平台共享HTML / JS / CSS代码?

How do I use both of them? Am I supposed to only use only one of them?
What about sharing the HTML/JS/CSS code with other platforms?

推荐答案


  • 项目根文件夹中的 www 文件夹包含所有平台的全局文件即可。这是您应该编辑的文件夹。

    • The www folder in the root folder of the project contains the global files for all platforms. This is the folder that you should edit.

      中的 www 文件夹platforms / ios 仅适用于iOS平台。当您运行 cordova build 时,此文件夹是从全局 www 文件夹构建的。您不应直接编辑此文件夹 - 如果您希望自定义特定平台,请参阅自定义每个平台部分。

      The www folder in platforms/ios is solely for the iOS platform. This folder is built from the global www folder when you run cordova build. You should not edit this folder directly - if you wish to customise a specific platform, see the Customise Each Platform section of the Cordova CLI documentation.

      如果您有更多平台( cordova平台添加< platform> ),然后这些平台也将使用全球<$构建的 www 文件夹c $ c> www 运行 cordova build [platform] 时的文件夹。

      If you had more platforms (cordova platform add <platform>), then those platforms would also have their www folders built from the global www folder when you run cordova build [platform].

      这篇关于为什么有两个Cordova www文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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