fossa-docs-screenshot-generator
v0.2.0
Published
Generate FOSSA docs-ready screenshots from source images.
Maintainers
Readme
fossa-docs-screenshot-generator
Generate FOSSA docs-ready PNG screenshots from local image files.
Requirements
- Node.js 20 or newer.
Usage
fossa-docs-screenshot ./product-screenshot.pngThe default output is written next to the input image:
./product-screenshot.pretty.pngMultiple inputs are supported:
fossa-docs-screenshot ./screenshots/*.pngOptions
fossa-docs-screenshot [options] <image...>-o, --output <path>writes a single input to a specific output path.-f, --forceoverwrites existing output files.--scale <number>changes the export multiplier. The default is2.--screenshot-size <percent>changes how large the screenshot appears in the background. The default is100.--window-padding <pixels>adds padding inside the macOS-style browser frame. The default is0.--no-browser-windowexports without the macOS-style browser frame.-h, --helpprints help.
Examples
fossa-docs-screenshot ./screenshots/settings.png
fossa-docs-screenshot --output ./docs/settings.png ./screenshots/settings.png
fossa-docs-screenshot --force ./screenshots/settings.png
fossa-docs-screenshot --screenshot-size 80 ./screenshots/settings.png
fossa-docs-screenshot --window-padding 32 ./screenshots/settings.png
fossa-docs-screenshot --no-browser-window --scale 1 ./screenshots/settings.pngLocal Development
From the repo root:
bun run --cwd packages/cli dev -- ./screenshot.pngBuild the CLI bundle:
bun run build:cliBuild And Package
From the repo root:
bun run package:cliThe package exposes the fossa-docs-screenshot binary and depends on sharp for Node-side image rendering.
Install the generated tarball globally to use it like a normal command:
npm install -g ./fossa-docs-screenshot-generator-0.2.0.tgz
fossa-docs-screenshot ./screenshot.pngThe package is published to npm, so you can also install it directly:
npm install -g fossa-docs-screenshot-generator