Poliage

Config File

The docsync.config.json file is the heart of your visual documentation. It defines global settings, scenarios, and variant configurations.

File Location

The config file should be in your project root:

my-project/
├── docsync.config.json
├── package.json
└── ...

Basic Structure

{
  "baseUrl": "http://localhost:3000",
  "assetDir": ".poliage/output",
  "concurrency": 2,
  "timeout": 45000,
  "headless": true,
  "viewport": {
    "width": 1280,
    "height": 720
  },
  "scenarios": [],
  "variants": {}
}

Global Settings

PropertyTypeDefaultDescription
baseUrlstring-Base URL for your application
assetDirstring.poliage/outputOutput directory for generated assets
concurrencynumber2Parallel browser instances
timeoutnumber45000Test timeout in milliseconds
headlessbooleantrueRun browsers without UI
viewportobject{ width: 1280, height: 720 }Default browser viewport size

Viewport Configuration

{
  "viewport": {
    "width": 1280,
    "height": 720,
    "deviceScaleFactor": 2
  }
}
PropertyDescription
widthViewport width in pixels
heightViewport height in pixels
deviceScaleFactorPixel density (2 for retina)

Storage Configuration

Configure where assets are uploaded:

{
  "storage": {
    "type": "poliage"
  }
}

See Publishing for all storage options.

Output Format Configuration

Configure the default output format for captures:

{
  "output": {
    "primaryFormat": "gif",
    "staticFormat": "png",
    "gif": {
      "loop": true,
      "fps": 15,
      "quality": "high",
      "maxDuration": 10000
    }
  }
}
PropertyDefaultDescription
primaryFormatgifDefault format for multi-step captures
staticFormatpngFormat for single-frame captures
gif.looptrueLoop GIFs infinitely
gif.fps15Frames per second
gif.maxDuration10000Maximum duration in milliseconds

Example Configuration

{
  "baseUrl": "http://localhost:3000",
  "assetDir": ".poliage/output",
  "concurrency": 3,
  "timeout": 60000,
  "headless": true,
  "viewport": {
    "width": 1440,
    "height": 900
  },
  "storage": {
    "type": "poliage"
  },
  "diffing": {
    "enabled": true,
    "threshold": 0.1
  },
  "scenarios": [
    {
      "name": "homepage",
      "steps": [
        { "action": "goto", "url": "/" },
        { "action": "capture", "key": "hero-section" }
      ]
    }
  ]
}