Skip to content

Commit

Permalink
🥙
Browse files Browse the repository at this point in the history
  • Loading branch information
transitive-bullshit committed May 10, 2019
1 parent 5827293 commit 25b78a6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const injectLottie = `
/**
* Renders the given Lottie animation via Puppeteer.
*
* Must pass either `path` or `animationData`.
* You must pass either `path` or `animationData` to specify the Lottie animation.
*
* `output` may be any of the following:
* - an image to capture the first frame only (png or jpg)
Expand Down
16 changes: 12 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,19 @@ This module is also available as a [CLI](https://github.com/transitive-bullshit/
npm install --save puppeteer-lottie
```

## Usage
If you want to generate **GIFs**, you must also install [gifski](https://gif.ski/). On macOS, you can run:

```bash
brew install gifski
```

If you want to generate **MP4s**, you must also install [ffmpeg](https://ffmpeg.org/). On macOS, you can run:

**TODO**
```bash
brew install ffmpeg
```

## Usage

```js
const renderLottie = require('puppeteer-lottie')
Expand Down Expand Up @@ -50,8 +60,6 @@ await renderLottie({
})
```

Note that all CSS styles are specified via the [JS CSS syntax](https://www.w3schools.com/jsref/dom_obj_style.asp), which uses camelCase instead of hyphens. This is, for instance, what [React](https://reactjs.org/docs/dom-elements.html#style) uses for its inline styles.

## API

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
Expand Down

0 comments on commit 25b78a6

Please sign in to comment.