Is there any way to exclude a folder while creating an xpi file using cfx xpi. The documentation doesnt provide any info on this.
I am asking this because in the directory created by cfx init i also have a directory as HTMLTestPages in which i have some test JavaScript since we cannot debug the add-on sdk JavaScript.
Every time i have to create an xpi file i have to remove the folder and again place it. furthermore, if we has this folder on svn this is more problematic.
searching on google shows this bug listed to exclude vim temporary files and in the comments they are also discussing excluding any files starting with .(period). So is there any way to check if this is working in add-on sdk 1.6.1?
The current Add-on SDK version will only add very specific subdirectories to the XPI package, namely
data
andlib
. If your project also has a subdirectoryfoo
or files at the top level with names that the SDK doesn't recognize - these will be simply ignored.Now if your files are located inside a known subdirectory like
data
- in this case they will be included in the package. The Add-on SDK has hardcorded rules concerning files and directories that should be excluded, you can see them underpython-lib/cuddlefish/util.py
:This means that file names starting with a period or ending with either
~
or.swp
will be ignored. But as far as directories goes - only.git
,.svn
and.hg
will be ignored (and this definitely works). If you want an additional directory to be ignored then the only way will be to editpython-lib/cuddlefish/util.py
and add it toIGNORED_DIRS
list (something that you will unfortunately have to repeat after each SDK update).