Skip to content

Commit 84978ce

Browse files
committed
Updated
1 parent 3e25cc5 commit 84978ce

File tree

2 files changed

+76
-2
lines changed

2 files changed

+76
-2
lines changed

README.md

Lines changed: 75 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,75 @@
1-
# react-webpack-component
1+
2+
# react-webpack-component
3+
4+
[![NPM version](https://badge.fury.io/js/react-webpack-component.svg)](https://npmjs.org/package/react-webpack-component) [![Build Status](https://travis-ci.org/kevoj/react-webpack-component.svg?branch=master)](https://travis-ci.org/kevoj/react-webpack-component) [![dependencies Status](https://david-dm.org/kevoj/react-webpack-component/status.svg)](https://david-dm.org/kevoj/react-webpack-component) [![devDependencies Status](https://david-dm.org/kevoj/react-webpack-component/dev-status.svg)](https://david-dm.org/kevoj/react-webpack-component?type=dev)
5+
[![GitHub license](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](https://raw.githubusercontent.com/kevoj/role-calc/master/LICENSE)
6+
7+
> Base structure in Webpack for the creation of npm modules in React
8+
9+
### Installation
10+
11+
* **Clone**
12+
13+
```bash
14+
git clone https://github.com/kevoj/react-webpack-component.git
15+
cd react-webpack-component
16+
npm install
17+
```
18+
19+
* **Create Link**
20+
21+
```bash
22+
npm run build
23+
npm link
24+
```
25+
26+
### Start
27+
28+
```bash
29+
npm start
30+
```
31+
32+
### Build
33+
34+
```bash
35+
npm run Build
36+
```
37+
38+
### Structure
39+
40+
<pre>
41+
|-- build (Compiled)
42+
| `-- index.js
43+
|-- src (Your code here, view example in code source...)
44+
| |-- components
45+
| `-- index.js
46+
`-- webpack.config.js
47+
</pre>
48+
49+
### Test the component in a project
50+
51+
```bash
52+
mkdir new-project (React project)
53+
cd new-project
54+
npm link react-webpack-component
55+
```
56+
57+
### At this point you can already use your component, usage:
58+
59+
```javascript
60+
import React, { Component } from 'react';
61+
import { Example } from 'react-webpack-component'
62+
63+
class HelloWorld extends Component {
64+
render() {
65+
return (
66+
<Example />
67+
);
68+
}
69+
}
70+
export default HelloWorld;
71+
```
72+
73+
## License
74+
75+
MIT © [Leonardo Rico](https://github.com/kevoj/react-webpack-component/blob/master/LICENSE)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-webpack-component",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "Base structure in Webpack for the creation of npm modules in React",
55
"main": "build/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)