layout | title | permalink | published | topic | tags | contributors | last_updated_by | date | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sidebar |
Package your extension |
/documentation/publish/package-your-extension/ |
true |
Publish |
|
|
potterwrit |
2019-07-14 18:14:39 -0700 |
{% capture page_hero_banner_content %}
During development, your extension will consist of a directory containing a manifest.json file and the other files the extension needs—scripts, icons, HTML documents, and so on. You need to zip these into a single file for uploading to AMO.
{% capture note %}
Packaged extensions in Firefox are called "XPI files", which are ZIP files with a different extension.
You don't have to use the XPI extension when uploading to AMO.
{% endcapture %} {% include modules/note.html content=note alert=false %}
{% endcapture %} {% include modules/page-hero.html content=page_hero_banner_content %}
{% capture content_with_toc %}
The most convenient way to package your extension is to use web-ext build. This tool automatically excludes files that are commonly unwanted in packages, such as .git
files. Otherwise, follow the instructions below for your operating system.
{% capture note %}
Tip: The ZIP file must be a ZIP of the extension's files themselves, not of the directory containing them.
{% endcapture %} {% include modules/note.html content=note alert=false %}
{% endcapture %} {% include modules/column-w-toc.html id="package-intro" content=content_with_toc %}
{% capture content %}
-
Open the directory containing your extension's files.
-
Select files and directories needed to implement your extension, exclude those files that aren't needed to run the extension, such as
.git
, graphic sources, and similar files. -
Open the shortcut menu and click Send to then Compressed (zipped) folder.

{% endcapture %} {% include modules/one-column.html id="package-windows" content=content aside="" %}
{% capture content %}
-
Open the directory containing your extension's files.
-
Select files and directories needed to implement your extension, excludes those files that aren't needed to run the extension, such as
.git
, graphic sources, and similar files. -
Open the shortcut menu and click Compress n Items.

{% endcapture %} {% include modules/one-column.html id="package-mac" content=content aside="" %}
{% capture content %}
-
Open Terminal.
-
Open the directory containing your extension's files, using the command
cd path/to/my-extension/
. -
ZIP the content of the directory—remembering to excludes those files that aren't needed to run the extension, such as
.git
, graphic sources, and similar files—using the commandzip -r -FS ../my-extension.zip * --exclude *.git*
.
{% capture note %}
See the documentation for the zip
command for more information.
{% endcapture %} {% include modules/note.html content=note alert=false %}
{% endcapture %} {% include modules/one-column.html id="package-linux" content=content aside="" %}
{%- include page-meta-data.html -%}
{%- include up-next.html -%}