Configure API extractor

Last modified by Manuel Leduc on 2026/04/14 09:54

Content

Steps

  1. Create anĀ api-extractor.json file at the root of the package with the following content
    {
      "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
      "extends": "@xwiki/platform-tool-apiextractorconfig/api-extractor.json"
    }
  2. Create an etc directory at the root of the package mkdir -p ./etc
  3. Add the api-extractor scripts in package.json
    {
      "scripts": {
        "api-extractor:ci": "api-extractor run",
        "api-extractor:local": "api-extractor run --local",
      }
    }
  4. Add the dev dependencies with pnpm pnpm add -D @microsoft/api-extractor @xwiki/platform-tool-apiextractorconfig

Get Connected