render-react-components
v1.1.3
Published
Cli tool for rendering react components.
Downloads
3
Maintainers
Readme
render-react-components
render-react-components is a cli tool to recursilvly search all the react components in your project(only in src derectory) 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