1 | # React NPM library starter kit
|
2 |
|
3 | [![Build Status](https://travis-ci.org/DimitriMikadze/create-react-library.svg?branch=master)](https://travis-ci.org/DimitriMikadze/create-react-library)
|
4 | [![Dependencies](https://img.shields.io/david/DimitriMikadze/create-react-library.svg)]()
|
5 | [![Dev Dependencies](https://img.shields.io/david/dev/DimitriMikadze/create-react-library.svg)]()
|
6 |
|
7 | based on Facebook's <a href="https://github.com/facebookincubator/create-react-app" target="_blank">Create react app</a>.
|
8 | We are constantly updating repository with the updates of `create-react-app`, so we have all new features and bug fixes of it.
|
9 |
|
10 | ## Converted to custom setup
|
11 |
|
12 | Moved all dependencies to dev dependencies because we don't need extra dependencies for our library after build, but we want all this features while developing:
|
13 |
|
14 | * React, JSX, ES6, and Flow syntax support.
|
15 | * Language extras beyond ES6 like the object spread operator.
|
16 | * A dev server that lints for common errors.
|
17 | * Import CSS and image files directly from JavaScript.
|
18 | * Autoprefixed CSS, so you don’t need `-webkit` or other prefixes.
|
19 | * A `build` script to bundle JS, CSS, and images for production.
|
20 |
|
21 | ## Getting Started
|
22 |
|
23 | Clone repo
|
24 |
|
25 | ````
|
26 | git clone https://github.com/DimitriMikadze/create-react-library.git
|
27 | ````
|
28 |
|
29 | Install dependencies
|
30 |
|
31 | `npm install` or `yarn install`
|
32 |
|
33 | Start development server
|
34 |
|
35 | `npm start` or `yarn start`
|
36 |
|
37 | Runs the demo app in development mode.
|
38 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
|
39 |
|
40 | ## Library files
|
41 |
|
42 | All library files are located inside `src/lib`
|
43 |
|
44 | ## Demo app
|
45 |
|
46 | Is located inside `src/demo` directory, here you can test your library while developing
|
47 |
|
48 | ## Testing
|
49 |
|
50 | `npm run test` or `yarn run test`
|
51 |
|
52 | ## Build library
|
53 |
|
54 | `npm run build` or `yarn run build`
|
55 |
|
56 | Produces production version of library under the `build` folder.
|
57 |
|
58 | ## Publish library
|
59 |
|
60 | `npm publish`
|
61 |
|
62 | ## Example library built with this starter kit
|
63 |
|
64 | https://github.com/DimitriMikadze/react-under-construction
|
65 |
|
\ | No newline at end of file |