Skip to content

Repository files navigation

Azot Extension Example

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.

  • Declares supported URL patterns in manifest.json.
  • Uses getEntries to parse media entries from a page URL.
  • Returns an entry with source, so Azot can create the downloadable resource automatically.

First time developing extensions?

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 from main.ts to dist/main.cjs.
  • Make changes to main.ts (or create new .ts files). Those changes should be automatically compiled into dist/main.cjs.
  • Reload Azot to load the new version of your extension.
  • For updates to the Azot API run npm i azot@alpha in the command line under your repo folder.
  • For testing we use vitest by default. Run npm test to run the test suite in main.test.ts.

Releasing new releases

  • Update your package.json with your new version number, such as 1.0.1, and engines.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 or npm 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

How to use

  • Clone this repo.
  • Make sure your Node.js is at least v24 (node --version).
  • npm i to install dependencies.
  • npm run dev to start compilation in watch mode.

Funding URL

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/"
    }
  ]
}

About

This is an example of an extension for Azot

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages