From e31297f82089d5456d174508fe83682375875b27 Mon Sep 17 00:00:00 2001 From: Cory House Date: Fri, 22 Mar 2019 14:47:46 -0500 Subject: [PATCH] CHANGE instances of yarn to npm in docs --- addons/storyshots/storyshots-puppeteer/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/storyshots/storyshots-puppeteer/README.md b/addons/storyshots/storyshots-puppeteer/README.md index d3d4d2a85120..cef93e5f8e11 100644 --- a/addons/storyshots/storyshots-puppeteer/README.md +++ b/addons/storyshots/storyshots-puppeteer/README.md @@ -3,7 +3,7 @@ Add the following module into your app. ```sh -yarn add @storybook/addon-storyshots-puppeteer --dev +npm install @storybook/addon-storyshots-puppeteer --save-dev ``` ## Configure Storyshots for image snapshots @@ -14,8 +14,8 @@ Internally, it uses [jest-image-snapshot](https://github.com/americanexpress/jes When willing to generate and compare image snapshots for your stories, you have two options: -- Have a storybook running (ie. accessible via http(s), for instance using `yarn run storybook`) -- Have a static build of the storybook (for instance, using `yarn run build-storybook`) +- Have a storybook running (ie. accessible via http(s), for instance using `npm run storybook`) +- Have a static build of the storybook (for instance, using `npm run build-storybook`) Then you will need to reference the storybook URL (`file://...` if local, `http(s)://...` if served) @@ -220,7 +220,7 @@ You have two options here, you can either: Note that you will certainly need a custom config file for Jest as you run it outside of the CRA scope and thus you do not have the built-in config. - Once that's setup, you can run `yarn run image-snapshots` (or `npm run image-snapshots`). + Once that's setup, you can run `npm run image-snapshots`. ### Reminder @@ -231,5 +231,5 @@ The browser opens a page (either using the static build of storybook or a runnin If you run your test without either the static build or a running instance, this wont work. To make sure your screenshots are taken from latest changes of your Storybook, you must keep your static build or running Storybook up-to-date. -This can be achieved by adding a step before running the test ie: `yarn run build-storybook && yarn run image-snapshots`. +This can be achieved by adding a step before running the test ie: `npm run build-storybook && npm run image-snapshots`. If you run the image snapshots against a running Storybook in dev mode, you don't have to worry about the snapshots being up-to-date because the dev-server is watching changes and rebuilds automatically.