Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/phucpnt/storybook-addon-r2request
Record, replay request addon for storybook
https://github.com/phucpnt/storybook-addon-r2request
Last synced: 12 days ago
JSON representation
Record, replay request addon for storybook
- Host: GitHub
- URL: https://github.com/phucpnt/storybook-addon-r2request
- Owner: phucpnt
- Created: 2019-06-13T07:10:17.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T00:37:44.000Z (almost 2 years ago)
- Last Synced: 2024-11-15T21:51:48.352Z (about 1 month ago)
- Language: JavaScript
- Size: 8.68 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## How to use with storybook
### Install the package
```npm install -D storybook-addon-r2request```### Edit the config.js
Add the following code:
```javascript
import { withR2Request } from "storybook-addon-r2request/lib/index";addDecorator(withR2Request);
```### Edit the addons.js
Add the following code```javascript
import 'storybook-addon-r2request/lib/register';
```### Edit the middleware.js
```javascript
const { register: registerR2Request } = require("storybook-addon-r2request/lib/middleware");module.exports = function expressMiddleware(app) {
registerR2Request(app);
};
```## Next
[ ] Support edit match request in story configurations