# storybook-addon-code-preview

> A storybook addon for previewing component files

Latest version **0.0.9** (published 2021-07-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install storybook-addon-code-preview
pnpm add storybook-addon-code-preview
yarn add storybook-addon-code-preview
bun add storybook-addon-code-preview
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.9 |
| Published | 2021-07-29 |
| First published | 2021-03-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 16 |
| Unpacked size | 47.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Alex Streza |
| Maintainers | astre9 |
| Keywords | storybook-addons, style, test, react |

## Links

- npm: https://www.npmjs.com/package/storybook-addon-code-preview
- Repository: https://github.com/alex-streza/code-preview
- Homepage: https://github.com/alex-streza/code-preview#readme
- Issues: https://github.com/alex-streza/code-preview/issues
- npm.io page: https://npm.io/package/storybook-addon-code-preview

## Dependencies (16)

- [react](https://npm.io/package/react.md) ^17.0.2
- [react-dom](https://npm.io/package/react-dom.md) ^17.0.2
- [@babel/cli](https://npm.io/package/@babel/cli.md) ^7.12.1
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.12.3
- [babel-loader](https://npm.io/package/babel-loader.md) ^8.1.0
- [@storybook/api](https://npm.io/package/@storybook/api.md) ^6.1.21
- [@storybook/react](https://npm.io/package/@storybook/react.md) ^6.1.21
- [@babel/preset-env](https://npm.io/package/@babel/preset-env.md) ^7.12.1
- [@storybook/addons](https://npm.io/package/@storybook/addons.md) ^6.1.21
- [@storybook/theming](https://npm.io/package/@storybook/theming.md) ^6.1.21
- [@babel/preset-react](https://npm.io/package/@babel/preset-react.md) ^7.12.5
- [@storybook/components](https://npm.io/package/@storybook/components.md) ^6.1.21
- [@storybook/core-events](https://npm.io/package/@storybook/core-events.md) ^6.1.21
- [react-syntax-highlighter](https://npm.io/package/react-syntax-highlighter.md) ^15.4.3
- [babel-plugin-transform-remove-console](https://npm.io/package/babel-plugin-transform-remove-console.md) ^6.9.4
- [@babel/plugin-proposal-class-properties](https://npm.io/package/@babel/plugin-proposal-class-properties.md) ^7.13.0

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads
- [aws-elasticsearch-connector](https://npm.io/package/aws-elasticsearch-connector.md) — 37.4K weekly downloads

## Recent versions

- 0.0.9 (latest) — 2021-07-29
- 0.0.8 — 2021-07-14
- 0.0.7 — 2021-04-19
- 0.0.6 — 2021-03-26
- 0.0.5 — 2021-03-26
- 0.0.4 — 2021-03-26
- 0.0.3 — 2021-03-26
- 0.0.2 — 2021-03-26
- 0.0.1 — 2021-03-26

## README

# Storybook Addon Code Preview

This Storybook addon gives you a preview for js|js|ts|tsx|css files of Storybook Components. 
It uses a custom Webpack config & loader and adds a preview tab for all files located under the **components** folder.

- 📝 Easily access story/component code
- ⚛️ History of accessed components
- 📦 Many more to come

![preview](https://user-images.githubusercontent.com/72100849/112695760-4b500380-8e8d-11eb-8637-2e311febba8a.gif)

## Getting Started

### Installation

First install the addon from npm:

```
npm i --save-dev storybook-addon-code-preview
# or
yarn add --dev storybook-addon-code-preview
```

Then add the following to your .storybook/main.js:

```
module.exports = {
  addons: ['storybook-addon-code-preview']
};
```

After registering the addon you're all good to go 🚀

---
_Source: https://npm.io/package/storybook-addon-code-preview · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
