From 25b78a6a20f0d7a96e06aec9a91cc2fd70fe5d53 Mon Sep 17 00:00:00 2001 From: Travis Fischer Date: Fri, 10 May 2019 08:27:25 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=A5=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 2 +- readme.md | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index b550358..5b5c1f3 100644 --- a/index.js +++ b/index.js @@ -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) diff --git a/readme.md b/readme.md index 26dbe4c..bc52fc5 100644 --- a/readme.md +++ b/readme.md @@ -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') @@ -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