Skip to content

adeyahya/regenr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Regenr

React Generator

Summary

Regenr is a command-line interface that helps Generating ReactJs Components.

Installation

npm install -g regenr

Usage

$ 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'

Options

-c [css preprocessor] or --css [css preprocessor]

Example:

$ regenr src/Components/Header -c less

Will provide .less integration

Screenshot

Screenshot

License

MIT