bloody-strip-proptypes

1.0.0 • Public • Published

strip-proptypes

Build Status

install

$ npm install bloody-strip-proptypes

what it does

in production, react doesn't check propTypes. this plugin removes the static propTypes declarations in ES6 classes.

class extends Component {

  static contextTypes = {
    router: PropTypes.func,
  }

  static propTypes = {
    content: PropTypes.string,
  }

  render() {
    return (
      <div />
    )
  }
}

will be transformed into

class extends Component {

  static contextTypes = {
    router: PropTypes.func,
  }

  render() {
    return (
      <div />
    )
  }
}

usage

$ babel --plugins bloody-strip-proptypes source.js

license

Package Sidebar

Install

npm i bloody-strip-proptypes

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • bloodyowl