Skip to content
/ shoty Public
generated from stagas/ts

animated and static element screenshots

License

Notifications You must be signed in to change notification settings

stagas/shoty

Repository files navigation

shoty

animated and static element screenshots

npm i shoty -g pnpm add shoty -g yarn global add shoty

CLI

Examples

# node
    # view source example/node.ts

    import { Options, run } from 'shoty'
    
    run(
      new Options({
        file: 'web.ts',
        root: __dirname,
      })
    ).then(() => console.log('complete'))

# web

    # view source example/web.ts

    document.body.innerHTML = `<h1 id="demo">hello world!</h1>`

API

# Options src/vite-open/dist/types/index.d.ts#L8
# Options src/runner.ts#L8
# AnimationOptions src/take-animation.ts#L7
# CliScreenshotOptions src/take-cli-screenshot.ts#L6
# ScreenshotOptions src/take-screenshot.ts#L7
# run(options) src/runner.ts#L42

    # options

    run(options)  =>

      Promise<void>

# takeAnimation(options) src/take-animation.ts#L17
# takeCliScreenshot(options) src/take-cli-screenshot.ts#L16
# takeScreenshot(options) src/take-screenshot.ts#L16

Credits

Contributing

Fork or edit and submit a PR.

All contributions are welcome!

License

MIT © 2022 stagas