https://github.com/rmosolgo/prop-types
Turn JSON into React.js PropType specification
https://github.com/rmosolgo/prop-types
Last synced: 3 months ago
JSON representation
Turn JSON into React.js PropType specification
- Host: GitHub
- URL: https://github.com/rmosolgo/prop-types
- Owner: rmosolgo
- Created: 2016-04-20T17:26:33.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-04-26T15:00:35.000Z (over 9 years ago)
- Last Synced: 2025-10-06T14:49:44.385Z (3 months ago)
- Language: Ruby
- Size: 501 KB
- Stars: 66
- Watchers: 2
- Forks: 9
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PropTypes
Generate PropTypes from JSON ([try it online](http://rmosolgo.github.io/prop-types)):

With some limitations:
- Can't take functions
- Assumes `null` is `any`
- Assumes any value `isRequired`
- Only checks first value of array (assumes all other values are the same type)
- Assumes that objects with the same keys are meant to be the same shape
### Development
- Run the tests:
```
rake test
```
- Rebuild the Javascript:
```
rake compile_js
```
- Start a preview HTTP server:
```
cd web && python -m SimpleHTTPServer
```
- Push to Github pages:
```
rake deploy
```