Navigation Menu

Skip to content

lewis617/render-react-components

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

render-react-components

NPM version NPM downloads Dependencies

查看中文版

render-react-components is a cli tool to recursilvly search all the react components in your project(only in src directory) and create files to render them �isolatedly.

Getting started

## Install globally or locally
$ npm i render-react-components -g

## Create files to render components
$ rrc init

## you can use the filter argument(the keyword of compoennt path) to init for part of components
$ rrc init --filter=Component1
## or simply use -f=keyword to filter
$ rrc init -f=Component1

## Local development
$ rrc dev

## Delete all the files that created by rrc init
$ rrc clean

Configuration

For configuration, you can use .rrc.js configuration file, e.g.

module.exports = {
  disableCSSModules: true,
  externals: {
    react: 'React',
    'react-dom': 'ReactDOM',
    'prop-types': 'PropTypes',
  }
};

disableCSSModules

Disable CSS Modules,we do not recommend doing this.

externals

Configure webpack's [externals] (https://webpack.js.org/configuration/externals/) property.

e.g.

// Don't pack react and react-dom
"externals": {
  "react": "window.React",
  "react-dom": "window.ReactDOM"
}

alias

Configure webpack's resolve.alias property.

extraResolveExtensions

Configure webpack's resolve.extensions property.

extraResolveModules

Configure webpack's resolve.modules property.

LICENSE

MIT

About

Cli tool for rendering react components

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published