|
1 | | -# react-npm-package-template |
| 1 | + |
| 2 | + |
| 3 | +<p align="center"> |
| 4 | + <a href="https://www.npmjs.com/package/react-npm-package-template"> |
| 5 | + <img src="https://img.shields.io/npm/v/react-npm-package-template" alt="npm version"> |
| 6 | + </a> |
| 7 | + <a href="https://travis-ci.org/awibox/react-npm-package-template"> |
| 8 | + <img src='https://travis-ci.org/awibox/react-npm-package-template.svg?branch=master' alt='Build' /> |
| 9 | + </a> |
| 10 | + <a href='https://coveralls.io/github/awibox/react-npm-package-template?branch=master'> |
| 11 | + <img src='https://coveralls.io/repos/github/awibox/react-npm-package-template/badge.svg?branch=master' alt='Coverage Status' /> |
| 12 | + </a> |
| 13 | + <a href="https://www.npmjs.com/package/react-npm-package-template"> |
| 14 | + <img src="https://img.shields.io/npm/dm/react-npm-package-template" alt="Downloads"> |
| 15 | + </a> |
| 16 | + <img src="https://img.shields.io/github/license/awibox/react-npm-package-template" alt="license"> |
| 17 | +</p> |
| 18 | + |
| 19 | +## Table of contents |
| 20 | +* [How to install](#howtoinstall) |
| 21 | +* [Initializing the package](#initializing) |
| 22 | +* [Rename a component](#rename) |
| 23 | +* [Build of the package](#build) |
| 24 | +* [Publishing a package](#publish) |
| 25 | +* [Travis CI](#travis) |
| 26 | +* [Coveralls](#coveralls) |
| 27 | +* [Badges in the readme](#badges) |
| 28 | + |
| 29 | +<a name="howtoinstall"></a> |
| 30 | +## How to install |
| 31 | +You can use this project like template. |
| 32 | +To do this, you need press button "**Use this template**". |
| 33 | + |
| 34 | +Or clone repository and go to the project folder. |
| 35 | +```bash |
| 36 | +git clone https://github.com/awibox/react-redux-app-boilerplate.git ProjectName |
| 37 | +cd ProjectName |
| 38 | +``` |
| 39 | +Then you should install required dependencies. |
| 40 | +```bash |
| 41 | +yarn install |
| 42 | +``` |
| 43 | +<a name="initializing"></a> |
| 44 | +## Initializing the package |
| 45 | +The first step is to initialize your package. You should execute following command: |
| 46 | +```bash |
| 47 | +npm init |
| 48 | +``` |
| 49 | +And fill in the required fields (package name, version, license). You can correct the other fields manually in the **package.json**. |
| 50 | + |
| 51 | +<a name="rename"></a> |
| 52 | +## Rename a component |
| 53 | +The next step is to replace the ```YourComponentName``` in the entire project with the one you need. |
| 54 | + |
| 55 | +<a name="build"></a> |
| 56 | +## Build of the package |
| 57 | +After writing the code you need to build the package with the following command: |
| 58 | +```bash |
| 59 | +yarn build |
| 60 | +``` |
| 61 | + |
| 62 | +<a name="publish"></a> |
| 63 | +## Publishing a package |
| 64 | +To publish a package, run the command: |
| 65 | +```bash |
| 66 | +npm publish |
| 67 | +``` |
| 68 | +If you are not logged in to npm you should run the command before publishing: |
| 69 | +```bash |
| 70 | +npm login |
| 71 | +``` |
| 72 | + |
| 73 | +<a name="travis"></a> |
| 74 | +## Travis CI |
| 75 | +For **Travis CI** to work you need to register on the [site](https://travis-ci.org/) and connect the repository. |
| 76 | + |
| 77 | +<a name="coveralls"></a> |
| 78 | +## Coveralls |
| 79 | +For **Coveralls** to work you need to register on the [site](https://coveralls.io/) and connect the repository. |
| 80 | + |
| 81 | +<a name="badges"></a> |
| 82 | +## Badges in the README.md |
| 83 | +For **badges** to work you need to change the repository name in the link and image paths. |
0 commit comments