Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
adeyahya authored Feb 10, 2018
1 parent 72fe5ec commit 0b6d519
Showing 1 changed file with 24 additions and 17 deletions.
41 changes: 24 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,33 @@ Regenr is a command-line interface that helps Generating ReactJs Components.
`npm install -g regenr`

## Usage
`regenr <path>/<componentName> [options]`
```bash
$ regenr <path>/<componentName> [options]
```

Example:
`regenr src/Components/Header` will provides:
```bash
$ regenr src/Components/Header
```
will provides:

*Header.js*
```javascript
import React from 'react'
import styles from './Header.scss'

class Header extends React.Component {
constructor(props) {
super(props)
this.displayName = 'Header'
}
render() {
return (
<div className={styles.Header}>
{/* Your code here */}
</div>
)
}
constructor(props) {
super(props)
this.displayName = 'Header'
}
render() {
return (
<div className={styles.Header}>
{/* Your code here */}
</div>
)
}
}

export default Header
Expand All @@ -38,20 +43,22 @@ export default Header
*Header.scss*
```sass
.Header{
/* Your stylesheet here */
/* Your stylesheet here */
}
```

*index.js*
```javascript
```js
export default './Header.js'
```

# Options
`-c [css preprocessor]` or `--css [css preprocessor]`

Example:
`regenr src/Components/Header -c less`
```bash
$ regenr src/Components/Header -c less
```

Will provide .less integration

Expand All @@ -60,4 +67,4 @@ Will provide .less integration
![Screenshot](/ss1.png?raw=true "Screenshot")

### License
MIT
MIT

0 comments on commit 0b6d519

Please sign in to comment.