https://github.com/universaldatatool/react-install-render
The simplest way to test a react component library
https://github.com/universaldatatool/react-install-render
javascript react reactjs
Last synced: about 1 month ago
JSON representation
The simplest way to test a react component library
- Host: GitHub
- URL: https://github.com/universaldatatool/react-install-render
- Owner: UniversalDataTool
- Created: 2020-11-26T18:20:09.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-19T05:36:14.000Z (over 5 years ago)
- Last Synced: 2025-09-24T18:30:59.026Z (9 months ago)
- Topics: javascript, react, reactjs
- Language: JavaScript
- Homepage:
- Size: 175 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React Install Render
The simplest way to test a react component library.
Running `react-install-render package-name` or `react-install-render path/to/package` will perform the following steps:
- Install the package in a temporary directory
- Render the component
## CLI Usage
```bash
# react-install-render
react-install-render package-name --props '{ "someProp": "hello world!" }'
```
## Library Usage
```javascript
const rir = require("react-install-render")
rir("path/to/package") // or "package-name"
.then(() => {
console.log("Success")
})
.catch(e => {
console.log(`Failed to install and render: ${e.toString()}`)
})
```
## Motivation
While maintaining the [Universal Data Tool](https://github.com/UniversalDataTool/universal-data-tool) we found that developers would sometimes introduce dependencies that would break the installation process of the react application. This module helps prevent that, by introducing a simple way to test the installation and rendering of a component.
React Install Render tests the actual installation of the package, which is not
done in most (all?) other react testing modules.