Skip to content

Commit f744843

Browse files
authored
Update README.md
1 parent e84c08d commit f744843

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

README.md

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

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

55

66
## Features
7-
- Use webpack for building component
8-
- Sass enabled (sass-loader)
9-
- ES2015 enabled (babel)
7+
- Webpack for building
8+
- Sass ready (sass-loader). Just ```import 'your/sass/files.scss``` from your components
9+
- ES2016 enabled (babel loader).
1010

1111
## Steps
1212
1. Clone the repo
1313
2. Change package name, author, etc in package.json
14-
3. ```npm install```
14+
3. Install all dependencies: ```npm install```
1515
4. Create your components under ```src/components/```
1616
5. Export them from from src/index.js:
17-
6. Run ```npm run build```
18-
7. Run```npm publish``` (You must have an npm account)
17+
6. Make a build: ```npm run build```
18+
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```
1920

2021

2122
## Preview components during develop
2223
In order to preview the component during development:
2324
1. Run ```npm start``` wich runs webpack in watch mode
2425
2. Create a symlink of the package: ```npm link```
25-
3. Create a new react project, for example with create-react-app
26-
4. Install the package from the symlink ```npm link my-react-components```
27-
5. Import the component ```import { MyComponent } from 'my-react-components'```
26+
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+
5. Import the component: ```import { MyComponent } from 'my-react-components'```
29+
6. Use it! ```<MyComponent />```
2830

0 commit comments

Comments
 (0)