From 0804bc1177f9b2fd1d5f1249f13c03c0e1bbcfc9 Mon Sep 17 00:00:00 2001 From: Siegel Date: Wed, 30 Jan 2019 17:07:39 +0000 Subject: [PATCH] Added minimal documentation --- Packages-react/ohif-viewer/README.md | 50 +++++++++---------------- Packages-react/ohif-viewer/package.json | 6 +-- 2 files changed, 21 insertions(+), 35 deletions(-) diff --git a/Packages-react/ohif-viewer/README.md b/Packages-react/ohif-viewer/README.md index dc0408477..98ed40b6a 100644 --- a/Packages-react/ohif-viewer/README.md +++ b/Packages-react/ohif-viewer/README.md @@ -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 ( - - ) - } -} -``` +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) \ No newline at end of file diff --git a/Packages-react/ohif-viewer/package.json b/Packages-react/ohif-viewer/package.json index a35e5d155..56578c23c 100644 --- a/Packages-react/ohif-viewer/package.json +++ b/Packages-react/ohif-viewer/package.json @@ -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": {