move-prop-types
"Help quickly replace the prop type checker in older react projects to map to prop-types"
Last updated 2 months ago by vichu1988 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install move-prop-types -g
SYNC missed versions from official npm registry.

move-prop-types

Build Status

Simple way to refactor your code to use the new prop-types package that has been separated out of the core react package.

Why

I was working with few projects to audit and that was the n-th time i saw a project started about an year ago or so, where prop type check was still done from React core package. The movement of prop-types from react to prop-types is as mundane a task possible and that was a reason to write a simpler way of getting the code updated.

Usage

   Usage: move-prop-types|mpt [options] [file|folder]
   
   
     Options:
   
       -V, --version  output the version number
       -I, --install  install the latest prop-types package and then continue with rest of the commands
       -P, --path     input path information of the file to update
       -F, --folder   input folder info where all the files would be updated
       -h, --help     output usage information

Examples

To install globally, run

npm i -g move-prop-types 

and now you should be able to run the package via move-prop-types or mpt and for single files by invoking

mpt -P <folder>/<filename>.<ext>

,currently supports usage on .js or .jsx files. For folder level usage, try using

mpt -F <folder>

If you feel lazy and lucky, try using -I in the command and we install prop-types for you in your project for you. :)

Issues

Please do share your comments as well comments and do raise issues for any specific requests or bugs you face.

Backlog

  • test cases for the code
  • implement es5 support
  • refactor code in a more efficient way.

License

move-prop-types is released under MIT license. LICENSE

Current Tags

  • 0.8.3                                ...           latest (2 months ago)

29 Versions

  • 0.8.3                                ...           2 months ago
  • 0.8.2                                ...           2 months ago
  • 0.8.1                                ...           2 months ago
  • 0.7.3                                ...           a year ago
  • 0.7.2                                ...           a year ago
  • 0.6.2                                ...           a year ago
  • 0.6.1                                ...           2 years ago
  • 0.6.0                                ...           2 years ago
  • 0.5.6                                ...           2 years ago
  • 0.5.5                                ...           2 years ago
  • 0.5.4                                ...           2 years ago
  • 0.5.3                                ...           2 years ago
  • 0.5.2                                ...           2 years ago
  • 0.5.1                                ...           2 years ago
  • 0.5.0                                ...           2 years ago
  • 0.4.3                                ...           2 years ago
  • 0.4.1                                ...           2 years ago
  • 0.4.0                                ...           2 years ago
  • 0.3.0                                ...           2 years ago
  • 0.2.2                                ...           2 years ago
  • 0.2.1                                ...           2 years ago
  • 0.1.8                                ...           2 years ago
  • 0.1.7                                ...           2 years ago
  • 0.1.6                                ...           2 years ago
  • 0.1.5                                ...           2 years ago
  • 0.1.4                                ...           2 years ago
  • 0.1.3                                ...           2 years ago
  • 0.1.2                                ...           2 years ago
  • 0.1.1                                ...           2 years ago

Copyright 2014 - 2016 © taobao.org |