Added minimal documentation

This commit is contained in:
Siegel 2019-01-30 17:07:39 +00:00
parent 1e898fd5c8
commit 0804bc1177
2 changed files with 21 additions and 35 deletions

View File

@ -1,43 +1,29 @@
# react-viewerbase
# OHIF Viewer (React Version)
> A set of React components for Medical Imaging Viewers.
*Status: Under development*
[![NPM](https://img.shields.io/npm/v/react-viewerbase.svg)](https://www.npmjs.com/package/react-viewerbase)
## Install
```bash
npm install --save react-viewerbase
```
## Usage
```jsx
import React, { Component } from 'react'
import CornerstoneViewport from 'react-viewerbase'
class Example extends Component {
render () {
return (
<CornerstoneViewport />
)
}
}
```
Disclaimer: Work in Progress
## To run locally
1. Clone this repository and build the library
1. `cd react-viewerbase`
1. `yarn install`
1. `yarn start`
1. Open a new terminal (or tab) and build the example application.
To user another DICOMWeb endpoint, adapt index.js
## To include in your projects
Please refer to the example in the example directory. To set the DICOMWeb endpoint and do other customization, adapt index.html.
### Build
1. `yarn install`
1. `yarn build`
1. `Go to http://localhost:5000`
### Run the example
1. `cd example`
1. `yarn install`
1. `yarn start`
1. `Go to http://localhost:5000`
## License
MIT © [OHIF](https://github.com/OHIF)
MIT © [OHIF](https://github.com/OHIF)

View File

@ -15,20 +15,20 @@
"npm": ">=5"
},
"scripts": {
"test": "cross-env CI=1 react-scripts test --env=jsdom",
"test:watch": "react-scripts test --env=jsdom",
"build": "rollup -c",
"start": "rollup -c -w",
"lint": "eslint -c .eslintrc --fix src && prettier --single-quote --write src/**/*.{js,jsx,json,css}",
"prepare": "npm run build",
"predeploy": "cd example && npm install && npm run build",
"deploy": "gh-pages -d example/build",
"generateStaticSite": "./generateStaticSite.sh",
"test:watch": "react-scripts test --env=jsdom",
"test": "cross-env CI=1 react-scripts test --env=jsdom",
"copy:webworkers": "cp node_modules/cornerstone-wado-image-loader/dist/*.min.js* public",
"version": "node -p -e \"'export default \\'' + require('./package.json').version + '\\';'\" > src/version.js",
"sha": "echo \"export default '\"$(git rev-parse HEAD)\"';\" > src/sha.js",
"details": "npm run version && npm run sha",
"prep": "npm run details && npm run copy:webworkers",
"start": "npm run prep && cross-env PORT=5000 react-scripts start",
"start:debug": "npm run prep && cross-env PORT=5000 react-scripts start"
},
"peerDependencies": {