Cli tool for rendering react components
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
examples/dead-simple
lib
.gitignore
CHANGELOG.md temp: update changelog Apr 25, 2018
README.md
README_zh-cn.md fix: 修复 resolve.modules bug,增加 extraResolveExtensions 和 extraResolveM… Apr 25, 2018
package.json fix: 修复 resolve.alias 和 resolve.modules 的 bug Apr 25, 2018
webpack.js feat: 第一版,可以用 init 和 dev 两个命令 Apr 23, 2018

README.md

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