[英]Cordova - Ignore folders on build
I've got a simple app for Phonegap. 我有一个简单的Phonegap应用程序。 In the
www
folder I added some NPM sugar to help development. 在
www
文件夹中,我添加了一些NPM糖来帮助开发。 Now, during the build I'd like to ignore this node_module
folder created by NPM when it loads the dependencies. 现在,在构建期间,我想忽略NPM在加载依赖项时创建的
node_module
文件夹。 It actually make the build fail. 它实际上使构建失败。
I've added an ant.properties
file within root/platforms/android/
and wrote this line: 我在
root/platforms/android/
添加了一个ant.properties
文件并编写了这一行:
aapt.ignore.assets:!.svn:!.git:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*.scc:*~:<dir>node_*
It prints that it ignores the folder node_modules because of that property, but when I look at the folder root/platforms/android/assets/www
I can see the node_modules
folder. 由于该属性,它打印它忽略文件夹node_modules,但是当我查看文件夹
root/platforms/android/assets/www
我可以看到node_modules
文件夹。
I guess my question is, is the folder actually being ignored in the created APK? 我想我的问题是,在创建的APK中文件夹实际被忽略了吗?
Make a copy of your APK
and change the file extension from .apk
to .zip
then extract the zip. 复制
APK
并将文件扩展名从.apk
更改为.zip
然后解压缩。 You will be able to browse to the www folder and see if it's in there or not. 您将能够浏览到www文件夹,看看它是否在那里。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.