Skip to content

Commit

Permalink
doc: add plugin to scully.config.defaultPostRenderers (#507)
Browse files Browse the repository at this point in the history
* doc: add plugin to scully.config.defaultPostRenderers

* docs: ScullyPluginFlashPrevention README, postRenderers on specific routes

* Update README.md

Co-authored-by: Sander Elias <SanderElias@users.noreply.github.com>
  • Loading branch information
mtopping and SanderElias authored Apr 28, 2020
1 parent fc297c8 commit 5677262
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions plugins/scully-plugin-flash-prevention/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,20 @@ And that's how it all works!!!

**1 -** Install the package: `npm install -D scully-plugin-flash-prevention`

**2 -** Add the postRenderer to your `scully.config`:
**2 -** Add the postRenderer to your `scully.config` routes:

```javascript
// Add this line to your imports
const { getFlashPreventionPlugin } = require('scully-plugin-flash-prevention');

// Add the following to your `scully.config.postRenderers`
// Add the following to specific routes via the `postRenderers` property
exports.config = {
...
postRenderers : [getFlashPreventionPlugin({appRootSelector: 'custom-app-root'})],
'/users/:userId': {
...
postRenderers : [getFlashPreventionPlugin({appRootSelector: 'custom-app-root'})],
...
}
...
}
```
Expand Down Expand Up @@ -106,10 +110,14 @@ That's all it takes to get set up.
This plugin has a series of options you can pass it when you call `getFlashPreventionPlugin(<OPTIONS HERE>)`.
Here is a description of those options.
- [appRootSelector](#approotselector)
- [appLoadedClass](#apploadedclass)
- [mockAttributesBlacklist](#mockattributesblacklist)
- [appRootAttributesBlacklist](#approotattributesblacklist)
- [ScullyPluginFlashPrevention](#scullypluginflashprevention)
- [How it works](#how-it-works)
- [Getting Started](#getting-started)
- [Options](#options)
- [appRootSelector](#approotselector)
- [appLoadedClass](#apploadedclass)
- [mockAttributesBlacklist](#mockattributesblacklist)
- [appRootAttributesBlacklist](#approotattributesblacklist)
### appRootSelector
Expand Down

0 comments on commit 5677262

Please sign in to comment.