Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
276 views
in Technique[技术] by (71.8m points)

android - Why are there two Cordova www folders?

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.

I saw that there are two www folders:

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

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
  • 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.

  • 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.

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].


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...