Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jaay7/blan-kit
Blan-kit is a collection of React UI components that help you to bring better styling for your website.
https://github.com/jaay7/blan-kit
npm-package react react-components storybook typescript ui-components
Last synced: 22 days ago
JSON representation
Blan-kit is a collection of React UI components that help you to bring better styling for your website.
- Host: GitHub
- URL: https://github.com/jaay7/blan-kit
- Owner: Jaay7
- License: mit
- Created: 2022-07-05T15:31:08.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-09T04:14:16.000Z (over 2 years ago)
- Last Synced: 2024-10-15T17:38:18.351Z (22 days ago)
- Topics: npm-package, react, react-components, storybook, typescript, ui-components
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/blan-kit
- Size: 240 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Blan-kit
Blan-kit is a collection of React UI components that help you to bring better styling for your website.
## Usage
To use this package in your application run the following command:
### Installing latest version
```sh
npm install blan-kit
```### Installing specific version
Checkout all the available versions [here](https://www.npmjs.com/package/blan-kit?activeTab=versions)
```sh
npm install blan-kit@
```> If you’re new to TypeScript and React, checkout [this handy cheatsheet](https://github.com/sw-yx/react-typescript-cheatsheet/)
## Commands
TSDX scaffolds your new library inside `/src`, and also sets up a [Parcel-based](https://parceljs.org) playground for it inside `/example`.
The recommended workflow is to run TSDX in one terminal:
```bash
npm start # or yarn start
```This builds to `/dist` and runs the project in watch mode so any edits you save inside `src` causes a rebuild to `/dist`.
Then run either Storybook or the example playground:
### Storybook
Run inside another terminal:
```bash
yarn 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.
### Example
Then run the example inside another:
```bash
cd example
npm i # or yarn to install dependencies
npm start # or yarn start
```The default example imports and live reloads whatever is in `/dist`, so if you are seeing an out of date component, make sure TSDX is running in watch mode like we recommend above. **No symlinking required**, we use [Parcel's aliasing](https://parceljs.org/module_resolution.html#aliases).
To do a one-off build, use `npm run build` or `yarn build`.
To run tests, use `npm test` or `yarn test`.
## Configuration
Code quality is set up for you with `prettier`, `husky`, and `lint-staged`. Adjust the respective fields in `package.json` accordingly.
### Jest
Jest tests are set up to run with `npm test` or `yarn test`.
### Bundle analysis
Calculates the real cost of your library using [size-limit](https://github.com/ai/size-limit) with `npm run size` and visulize it with `npm run analyze`.
#### Setup Files
This is the folder structure we set up for you:
```txt
/example
index.html
index.tsx # test your component here in a demo app
package.json
tsconfig.json
/src
index.tsx # EDIT THIS
/test
blah.test.tsx # EDIT THIS
/stories
Thing.stories.tsx # EDIT THIS
/.storybook
main.js
preview.js
.gitignore
package.json
README.md # EDIT THIS
tsconfig.json
```#### React Testing Library
We do not set up `react-testing-library` for you yet, we welcome contributions and documentation on this.
### Rollup
TSDX uses [Rollup](https://rollupjs.org) as a bundler and generates multiple rollup configs for various module formats and build settings. See [Optimizations](#optimizations) for details.
### TypeScript
`tsconfig.json` is set up to interpret `dom` and `esnext` types, as well as `react` for `jsx`. Adjust according to your needs.
## Module Formats
CJS, ESModules, and UMD module formats are supported.
The appropriate paths are configured in `package.json` and `dist/index.js` accordingly. Please report if any issues are found.