- Install Node.js.
- Go to the project root, run
npm install
. This will install all required dependencies.
Extra preparations are needed if you want to pull locale files from Transifex:
- Install Transifex client. Follow the instructions on this page.
- You need a
.transifexrc
file in the root folder. Contact another admin if you need one. It includes the API key to use Transifex's API.
Use the following command to generate a ZIP file that can be submitted to AMO or CWS:
npm run zip
The zip file includes all the files from the repository except:
- All dot files (e.g.
.eslintrc
&.gitignore
). node_modules
folder.tools
folder.package.json
file.package-lock.json
and/oryarn.lock
file(s).
Use the npm version (major | minor | patch)
command to tag a release.
There are some scripts that will run automatically before/after tagging a version. Includes:
- Test.
- Update version number in
manifest.json
. - Generate the ZIP file.
- Push the tag to github.
We host locale files (message.json
) on Transifex. All the files exist in our GitHub repository, but if you need to update the locale files, you will need to install the Transifex client
To pull files from Transifex, run
npm run update-locales
To push files to Transifex:
npm run update-transifex
3rd-party libraries are managed by npm
. Since Stylus is built with vanilla JS, we only use libraries that can run in the browser.
We keep a copy of these libraries inside the vendor
directory so users can side-load this repository without executing the build script. These files are downloaded from CDN or pulled from npm (node_modules
).
To add/update a library to the latest version, run npm install PACKAGE_NAME@latest
.
To remove a library, run npm uninstall PACKAGE_NAME
.
After the (un)installation, specify files which should be copied in tools/build-vendor.js
and run npm run build-vendor
to rebuild the vendor folder.