# create-component-lib

> Create a library of React components that can be published to npm

Latest version **0.1.6** (published 2018-12-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install create-component-lib
pnpm add create-component-lib
yarn add create-component-lib
bun add create-component-lib
```

Provides the command `create-component-lib`.

## 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.1.6 |
| Published | 2018-12-18 |
| First published | 2018-06-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 89 |
| Author | Aakash N S |
| Maintainers | aakashns |
| Keywords | react, component-library |

## Links

- npm: https://www.npmjs.com/package/create-component-lib
- Repository: https://github.com/aakashns/create-component-lib
- Homepage: https://github.com/aakashns/create-component-lib#readme
- Issues: https://github.com/aakashns/create-component-lib/issues
- npm.io page: https://npm.io/package/create-component-lib

## 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

- 0.1.6 (latest) — 2018-12-18
- 0.1.5 — 2018-06-13
- 0.1.4 — 2018-06-13
- 0.1.3 — 2018-06-13
- 0.1.2 — 2018-06-13
- 0.1.1 — 2018-06-13
- 0.1.0 — 2018-06-13

## README

# create-component-lib

Create a library of React components that can be published to npm.

**Notes:**
- Uses `create-react-app` under the hood.
- Inspired from [this blog post](https://hackernoon.com/creating-a-library-of-react-components-using-create-react-app-without-ejecting-d182df690c6b).
- Currenlty tested only on Linux and Mac. 
- It's really just a [shell script](./create-component-lib). Contributions welcome!

## Usage

To create a new project, run the command:

```
npx create-component-lib my-project
```

This sets up the project inside `my-project`.

Place everything you want to publish to npm inside `src/lib`. Outside `src/lib` (but inside `src/`), you can create example web pages to test or demonstrate the usage of your components.

To start the development server (with entry point `src/index.js`), run

```
npm start
```

To transpile `src/lib` and create a build in the `dist` folder, run:

```
npm run build
```

You can then publish it to npm using:

```
npm publish
```

Note that only `README.md` and the `dist` folders are published to npm.

To learn more, see [this blog post](https://hackernoon.com/creating-a-library-of-react-components-using-create-react-app-without-ejecting-d182df690c6b) or this [sample libary](https://github.com/aakashns/simple-component-library).

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