1.9 KiB
Build this project
Preparation
- Install Node.js.
- Go to the project root, run
npm install
. This will install all required dependencies.
Generate the ZIP release
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).
Tag a release/Bump the version
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.
Translation
We host transalation files (message.json
) on Transifex. To pull files from Transifex, run
npm run update-locales
To push files to Transifex:
npm run update-transifex
3rd-party libraries
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, run npm run build-vendor
to rebuild the vendor folder.