React Generator
Regenr is a command-line interface that helps Generating ReactJs Components.
npm install -g regenr
$ regenr <path>/<componentName> [options]
Example:
$ regenr src/Components/Header
will provides:
Header.js
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>
)
}
}
export default Header
Header.scss
.Header{
/* Your stylesheet here */
}
index.js
export default './Header.js'
-c [css preprocessor]
or --css [css preprocessor]
Example:
$ regenr src/Components/Header -c less
Will provide .less integration
MIT