Skip to content

Commit 856e2bb

Browse files
authored
Update README.md
1 parent 80d7347 commit 856e2bb

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
11
# npm-react-component-starter
22

3-
Project sample prepared for create and publish React components on [npm](https://www.npmjs.com/)
3+
Sample project prepared for create and publish React components on [npm](https://www.npmjs.com/)
44

55

66
## Features
77
- Webpack for building
8-
- Sass ready (sass-loader). Just ```import 'your/sass/files.scss``` from your components
9-
- ES2016 enabled (babel loader).
8+
- Sass ready (sass-loader). Just ```import 'your/sass/files.scss'``` from your components
9+
- ES2016 ready (babel loader).
10+
- Import images ready (url-loader). Just ```import myImage from 'my/image/dir'```
1011

11-
## Steps
12-
1. Clone the repo
13-
2. Change package name, author, etc in package.json
12+
## How to use
13+
1. Clone the repo: ```git clone git@github.com:nmartinezb3/npm-react-component-starter.git```
14+
2. Change package name, author, and all stuff in package.json
1415
3. Install all dependencies: ```npm install```
1516
4. Create your components under ```src/components/```
1617
5. Export them from from src/index.js:
1718
6. Make a build: ```npm run build```
1819
7. Publish to npm: ```npm publish``` (You must have an npm account)
19-
8. You are ready to install the package with ```npm install my-react-components```
20+
8. Now you are ready to install the package with ```npm install my-react-components```
2021

2122

2223
## Preview components during develop
2324
In order to preview the component during development:
2425
1. Run ```npm start``` wich runs webpack in watch mode
2526
2. Create a symlink of the package: ```npm link```
2627
3. Create a new react project, for example with [create-react-app](https://github.com/facebookincubator/create-react-app)
27-
4. Install the package from the symlink: ```npm link my-react-components```
28+
4. Install the package from the symlink: ```npm link my-react-components``` (check the package name you set in ```package.json```)
2829
5. Import the component: ```import { MyComponent } from 'my-react-components'```
2930
6. Use it! ```<MyComponent />```
3031

0 commit comments

Comments
 (0)