Use .jpmignore to ignore files from your XPI builds created via jpm.

Using .jpmignore to ignore files and directories

Using .jpmignore is similar to using .gitignore with git, .hgignore with Mercurial, or .npmignore with npm. By using this file you can let jpm know which files and directories you would like it to ignore when building a .xpi file with jpm xpi.

Here is an example:

# Ignore .DS_Store files created by mac
.DS_Store

# Ignore any zip or xpi files
*.zip
*.xpi

# Ignore specific directory
# You can start patterns with a forward slash (/) to avoid recursivity.
# You can end patterns with a forward slash (/) to specify a directory.
/sample/

A .jpmignore file with the above contents would ignore all zip files and .DS_Store files and sample directory from the xpi generated by jpm xpi.

Using .jpmignore to allow files

Everything in your add-on directory will be included in the xpi file you make with jpm xpi. If your project folder contains a lot of files that aren't necessary for the xpi to run, like documentation, jshint, etc., you can use .jpmignore as a whitelist instead of a blacklist. For example:

.*
*
!/data/**
!/lib/**
!/locale/**
!/node_modules/**
!/package.json
!/icon.png
!/icon64.png
!/COPYING
!/bootstrap.js
!/install.rdf

This would include all editor backup files and similar in the whitelisted subdirectories, to avoid that you can append another blacklist after the whitelist. This one would work for Xemacs:

.*
*
!/data/**
!/lib/**
!/locale/**
!/node_modules/**
!/package.json
!/icon.png
!/icon64.png
!/COPYING
!/bootstrap.js
!/install.rdf

*~
\#*

Document Tags and Contributors

Tags: 
 Contributors to this page: backy0175, rgh36167, Sebastianz, wbamberg, nikolas, evold
 Last updated by: backy0175,