https://github.com/abcnews/story-lab-component-library
https://github.com/abcnews/story-lab-component-library
library
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/abcnews/story-lab-component-library
- Owner: abcnews
- License: mit
- Created: 2020-05-22T02:55:16.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-07-12T06:54:04.000Z (almost 3 years ago)
- Last Synced: 2025-10-18T10:29:01.628Z (9 months ago)
- Topics: library
- Language: TypeScript
- Homepage:
- Size: 3.52 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Story Lab component library
A collection of reusable React components for use in Story Lab ... stories.
## Usage
```bash
npm install @abcnews/story-lab-component-library
```
This library is in its infancy and is barely documented or even useful.
You can see all available components in [the storybook](https://abcnews.github.io/story-lab-component-library/)
## Development
Get started:
```
git clone https://github.com/abcnews/story-lab-component-library.git
cd story-lab-component-library
npm i
```
This repository uses [TSDX](https://github.com/formik/tsdx) with [Storybook](https://github.com/storybookjs/storybook/).
The recommended workflow is to run TSDX in one terminal and Storybook in another:
```
npm start
```
This builds to `/dist` and runs the project in watch mode so any edits you save inside `src` causes a rebuild to `/dist`.
### Storybook
Run inside another terminal:
```
npm run storybook
```
This loads the stories from `./stories`.
> NOTE: Stories should reference the components as if using the library, similar to the example playground. This means importing from the root project directory. This has been aliased in the tsconfig and the storybook webpack config as a helper.
### Build & release
Releases are built and deployed using [np](https://github.com/sindresorhus/np).
```
npm run release
```
If you're deploying a new production release, you should also update the Storybook. The following command will freshly build and deploy it to GitHub pages.
```
npm run deploy-storybook
```