This is an example of an extension for Azot.
This project uses TypeScript to provide type checking and documentation. The repo depends on the latest extension API in TypeScript Definition format, which contains TSDoc comments describing what it does.
This extension example demonstrates some of the basic functionality the extension API can do. Bitmovin is used as an example of a service from which metadata is extracted for downloading.
- Detects whether the URL is supported by the extension.
- Parses download (manifest) links from a given URL.
Quick starting guide for new extension devs:
- Check if someone already developed an extension for what you want! There might be an existing extension similar enough that you can partner up with.
- Make a copy of this repo as a template with the "Use this template" button (login to GitHub if you don't see it).
- Clone your repo to a local development folder.
- Install Node.js, then run
npm i
in the command line under your repo folder. - Run
npm run dev
to compile your extension frommain.ts
tomain.js
. - Make changes to
main.ts
(or create new.ts
files). Those changes should be automatically compiled intomain.js
. - Reload Azot to load the new version of your extension.
- For updates to the Azot API run
npm i azot@latest
in the command line under your repo folder.
-
Update your
package.json
with your newversion
number, such as1.0.1
, andengines.azot
with the minimum Azot version required for your latest release.You can simplify the version bump process by running
npm version patch
,npm version minor
ornpm version major
. -
Push all commits and tags to GitHub.
-
GitHub Actions workflow will handle the rest when new tags are pushed to GitHub.
Adding your extension to the community extension list
- Publish an initial version.
- Make sure you have a
README.md
file in the root of your repo. - Make a pull request at https://github.com/azot-labs/extensions to add your extension.
- Clone this repo.
- Make sure your Node.js is at least v20 (
node --version
). npm i
to install dependencies.npm run dev
to start compilation in watch mode.
You can include funding URLs where people who use your extension can financially support it.
The simple way is to set the funding
field to your link in your package.json
file:
{
"funding": {
"type": "patreon",
"url": "https://www.patreon.com/"
}
}
If you have multiple URLs, you can also do:
{
"funding": [
{
"type": "individual",
"url": "https://boosty.to/"
},
{
"type": "patreon",
"url": "https://www.patreon.com/"
}
]
}