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:
Code
my-project/
├── docsync.config.json
├── package.json
└── ...
Basic Structure
JSON
{
"baseUrl": "http://localhost:3000",
"assetDir": ".reshot/output",
"concurrency": 2,
"timeout": 45000,
"headless": true,
"viewport": {
"width": 1280,
"height": 720
},
"scenarios": [],
"variants": {}
}
Global Settings
| Property | Type | Default | Description |
|---|---|---|---|
baseUrl | string | - | Base URL for your application |
assetDir | string | .reshot/output | Output directory for generated assets |
concurrency | number | 2 | Parallel browser instances |
timeout | number | 45000 | Test timeout in milliseconds |
headless | boolean | true | Run browsers without UI |
viewport | object | { width: 1280, height: 720 } | Default browser viewport size |
Viewport Configuration
JSON
{
"viewport": {
"width": 1280,
"height": 720,
"deviceScaleFactor": 2
}
}
| Property | Description |
|---|---|
width | Viewport width in pixels |
height | Viewport height in pixels |
deviceScaleFactor | Pixel density (2 for retina) |
Storage Configuration
Configure where assets are uploaded:
JSON
{
"storage": {
"type": "reshot"
}
}
See Publishing for all storage options.
Output Format Configuration
Configure the default output format for captures:
JSON
{
"output": {
"primaryFormat": "gif",
"staticFormat": "png",
"gif": {
"loop": true,
"fps": 15,
"quality": "high",
"maxDuration": 10000
}
}
}
| Property | Default | Description |
|---|---|---|
primaryFormat | gif | Default format for multi-step captures |
staticFormat | png | Format for single-frame captures |
gif.loop | true | Loop GIFs infinitely |
gif.fps | 15 | Frames per second |
gif.maxDuration | 10000 | Maximum duration in milliseconds |
Example Configuration
JSON
{
"baseUrl": "http://localhost:3000",
"assetDir": ".reshot/output",
"concurrency": 3,
"timeout": 60000,
"headless": true,
"viewport": {
"width": 1440,
"height": 900
},
"storage": {
"type": "reshot"
},
"diffing": {
"enabled": true,
"threshold": 0.1
},
"scenarios": [
{
"name": "homepage",
"steps": [
{ "action": "goto", "url": "/" },
{ "action": "capture", "key": "hero-section" }
]
}
]
}