|
1 |
| -# Benzin |
| 1 | +<p align="center"><img src="src/assets/icon.svg" /></p> |
| 2 | +<h1 align="center"> BENZIN </h1> |
2 | 3 |
|
3 |
| -A powerful React Material components library. |
| 4 | +[React](https://reactjs.org/) Material components library. It supplies you with cool pre-defined style, while assuring that your project will follow all [Material Design guidelines](https://material.io/). |
| 5 | + |
| 6 | +[](https://github.com/eug-vs/react-benzin/releases) |
| 7 | +[](https://github.com/eug-vs/react-benzin/commits/develop) |
| 8 | +[](https://github.com/eug-vs/react-benzin/network/dependencies) |
| 9 | +[](https://github.com/eug-vs/react-benzin/releases) |
| 10 | +[](https://github.com/eug-vs/react-benzin/blob/develop/LICENSE.md) |
| 11 | + |
| 12 | + |
| 13 | +# Getting started |
| 14 | +## Installation |
| 15 | +You can easily add **BENZIN** to your project with `npm`: |
| 16 | +```bash |
| 17 | +$ npm install react-benzin |
| 18 | +``` |
| 19 | +**BENZIN** works best in kick-starting new projects and allows you to focus on the functionality, while all the beauty will be maintained by our library. |
| 20 | + |
| 21 | +**TIP:** *Create-React-App with Typescript* is your GO-TO in most of the cases. [Learn more.](https://create-react-app.dev/docs/adding-typescript/) |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | +You can find a minimal usage example [here](src/index.tsx). |
| 26 | + |
| 27 | +## Functionality |
| 28 | +**BENZIN** provides you with a bunch of cool components that greatly integrate with each other. |
| 29 | + |
| 30 | +[Explore](src/lib) `src/lib/` folder to see what's available. Documentation is yet to come, but for now you can enjoy type definitons. |
| 31 | + |
| 32 | +[Chrono-Cube](https://github.com/eug-vs/chrono-cube/) will also be a great example of usage, since it's the actual project which inspired us to create **BENZIN**. |
| 33 | + |
| 34 | + |
| 35 | +# Explore NPM package online |
| 36 | +https://www.npmjs.com/package/react-benzin |
| 37 | + |
| 38 | + |
| 39 | +# Development |
| 40 | +## Running live demo |
| 41 | +To run a live example, clone a repo and execute following commands: |
| 42 | +```bash |
| 43 | +$ npm i |
| 44 | +$ npm start |
| 45 | +``` |
| 46 | +It's worth noticing that presence of React-App in this repo forces us to split some configurations. For example, we have 2 `Typescript` configs: one for `react-scripts` to run live-demo, and the other one to build *distribution files*. |
| 47 | + |
| 48 | +## Running tests |
| 49 | +```bash |
| 50 | +$ npm test |
| 51 | +``` |
| 52 | +**NOTE**: this command assures that `ESlint` does not throw any warnings and exits with a *non-zero status code* otherwise. That means `CircleCI` tests would fail *even if a single warning is present*. Therefore, you should always locally test your changes before publishing them. |
| 53 | + |
| 54 | +## Building |
| 55 | +We've decided to use `Typescript compiler` to transpile our code, since we think `Babel` is a bit of an overkill here. |
| 56 | +```bash |
| 57 | +$ npm run build |
| 58 | +``` |
| 59 | +This command will generate `dist/` folder ready for distribution, which you of course can explore. Note that `tsc` creates type definitions (`.d.ts`) for every corresponding `.js` file. It's very useful because consumers also get access to them. |
| 60 | + |
| 61 | +## Deploying |
| 62 | +Deploying to `npm` is fully automated through **CircleCI**: simply tag a commit as a Release and it will do the job. |
0 commit comments