# pub-test-comp

> A skeleton to create your own React component library using Rollup, TypeScript, Sass and Storybook

Latest version **1.0.0** (published 2020-03-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install pub-test-comp
pnpm add pub-test-comp
yarn add pub-test-comp
bun add pub-test-comp
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2020-03-11 |
| First published | 2020-03-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 782 |
| Author | Harvey Delaney |
| Maintainers | sergini |
| Keywords | React, Component, Library, Rollup, Typescript, Sass, Storybook |

## Links

- npm: https://www.npmjs.com/package/pub-test-comp
- Repository: https://github.com/HarveyD/react-component-library
- Homepage: https://github.com/HarveyD/react-component-library#readme
- Issues: https://github.com/HarveyD/react-component-library/issues
- npm.io page: https://npm.io/package/pub-test-comp

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2020-03-11

## README

# React Component Library

This project skeleton was created to help people get started with creating their own React component library using:
- [Rollup](https://github.com/rollup/rollup)
- [Sass](https://sass-lang.com/)
- [TypeScript](https://www.typescriptlang.org/)

It also features:
- :white_check_mark: [Storybook](https://storybook.js.org/) to help you create and show off your components
- :white_check_mark: [Jest](https://jestjs.io/) and [Enzyme](https://airbnb.io/enzyme/) enabling testing of the components

[**Read my blog post about why and how I created this project skeleton ▸**](https://blog.harveydelaney.com/creating-your-own-react-component-library/)

## Development
### Testing
```shell
npm run test
```

### Building
```shell
npm run build
```

### Storybook
```shell
npm run storybook
```

### Installing component library locally
Let's say you have another project (`test-app`) on your machine that you want to try installing the component library into without having to first publish the component library. In the `test-app` directory, you can run:
```shell
npm i --save ../react-component-library
```
which will install the local component library as a dependency in `test-app`. Your components can then be imported and used.

### Publishing
First make sure that you've updated the `name` field in `package.json` to reflect your NPM package name in your private or public NPM registry. Then run:

```shell
npm publish
```

## Component Usage
Let's say you created a public NPM package called `harvey-component-library` with the `TestComponent` component created in this repository.

Usage of the component (after the library installed as a dependency into another project) will be:

```javascript
import React from "react";
import { TestComponent } from "harvey-component-library";

const App = () => (
    <div className="app-container">
        <h1>Hello I'm consuming the component library</h1>
        <TestComponent theme="primary" />
    </div>
);

export default App;
```

---
_Source: https://npm.io/package/pub-test-comp · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
