# @nilsmich/ui-component-lib

> This is a UI component Lib that I use for private projects. It's based on Material UI and only works with next.js

Latest version **1.0.18** (published 2021-06-19) · UNLICENSED license · 0 weekly downloads

## Install

```sh
npm install @nilsmich/ui-component-lib
pnpm add @nilsmich/ui-component-lib
yarn add @nilsmich/ui-component-lib
bun add @nilsmich/ui-component-lib
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.18 |
| Published | 2021-06-19 |
| First published | 2021-06-07 |
| Weekly downloads | 0 |
| License | UNLICENSED |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 23.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | nilsmich |
| Maintainers | nilsmich |

## Links

- npm: https://www.npmjs.com/package/@nilsmich/ui-component-lib
- npm.io page: https://npm.io/package/@nilsmich/ui-component-lib

## Dependencies (2)

- [react-icons](https://npm.io/package/react-icons.md) ^4.2.0
- [react-country-flag](https://npm.io/package/react-country-flag.md) ^2.3.0

## Recent versions

- 1.0.18 (latest) — 2021-06-19
- 1.0.16 — 2021-06-15
- 1.0.15 — 2021-06-15
- 1.0.14 — 2021-06-15
- 1.0.13 — 2021-06-15
- 1.0.12 — 2021-06-09
- 1.0.11 — 2021-06-09
- 1.0.10 — 2021-06-09
- 1.0.9 — 2021-06-08
- 1.0.8 — 2021-06-08
- 1.0.7 — 2021-06-08
- 1.0.6 — 2021-06-08
- 1.0.5 — 2021-06-07
- 1.0.4 — 2021-06-07
- 1.0.3 — 2021-06-07
- … 2 more at https://npm.io/package/@nilsmich/ui-component-lib/versions

## README

# What it does
This is a UI component Lib that I use for private projects. It's based on Material UI 
and only works with next.js

# How to use
See example code in private Git. Basically add file: next.config.js with the content

    // https://www.npmjs.com/package/next-transpile-modules
    const withTM = require('next-transpile-modules')([
      '@nilsmich/ui-component-lib'
    ])
    
    const withBundleAnalyzer = require('@next/bundle-analyzer')({
      enabled: process.env.ANALYZE === 'true'
    })
    
    module.exports = withTM(
      withBundleAnalyzer({
        future: {
          webpack5: true,
        },
        webpack: function (config, options) {
          config.experiments = {};
          return config;
        }
      })
    )

And install next-transpile-modules in the project that consumes the lib.












## Publishing
* https://docs.npmjs.com/cli/v7/commands/npm-publish

npm publish --access public for initial publishing.

## unpublish
* https://docs.npmjs.com/unpublishing-packages-from-the-registry

npm unpublish <package-name> -f





## Interesting resources
### quite nice articles
* The inital lib was based on this article: https://prateeksurana.me/blog/react-component-library-using-storybook-6/#compiling-the-library-using-rollup
* https://www.npmjs.com/package/styled-jsx-for-rollup?activeTab=readme
* https://blog.harveydelaney.com/creating-your-own-react-component-library/
* https://blog.bitsrc.io/3-ways-to-build-your-own-react-component-library-b4d00013a716 -> create-react-library
* https://hinammehra.medium.com/build-a-private-react-component-library-cra-rollup-material-ui-github-package-registry-1e14da93e790
* https://zellwk.com/blog/publish-to-npm/
  
### some more intersting reading
* https://blog.cristiana.tech/creating-a-react-component-library-with-typescript-storybook-and-rollup
* https://www.codefeetime.com/post/rollup-config-for-react-component-library-with-typescript-scss/
* https://medium.com/@dennisschneider/how-to-create-a-react-component-library-with-typescript-rollup-js-and-storybook-cc3fe95c9c44 

  https://github.com/thepeaklab/react-component-library-starter
* https://github.com/HarveyD/react-component-library
* https://soshace.com/how-to-careate-a-react-ccomponent-library-using-a-modal-example/
* https://lebersoftware.hu/how-to-make-a-react-component-library-gitlab-npm-registry-babel-material-ui-step-by-step/

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