From 5609070fd811b5a4a93678202b20606bf863d00a Mon Sep 17 00:00:00 2001 From: dannyrb Date: Fri, 10 May 2019 09:46:58 -0400 Subject: [PATCH] Add installation --- docs/latest/SUMMARY.md | 1 + docs/latest/essentials/installation.md | 42 ++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 docs/latest/essentials/installation.md diff --git a/docs/latest/SUMMARY.md b/docs/latest/SUMMARY.md index a7ae5632a..c06ce54ab 100644 --- a/docs/latest/SUMMARY.md +++ b/docs/latest/SUMMARY.md @@ -2,6 +2,7 @@ - Essentials - [Getting Started](essentials/getting-started.md) + - [Installation](essentials/installation.md) - [Data Source](essentials/data-source.md) - [Configuration](essentials/configuration.md) - [Themeing](essentials/themeing.md) diff --git a/docs/latest/essentials/installation.md b/docs/latest/essentials/installation.md new file mode 100644 index 000000000..326b5f0d2 --- /dev/null +++ b/docs/latest/essentials/installation.md @@ -0,0 +1,42 @@ +# Installation + +It's important to know that the OHIF Viewer project provides two different build +processes: + +```bash +# Static Asset output: For deploying PWAs +yarn run build:web + +# Single `.js` script, for embedding viewer into existing apps +yarn run build:package +``` + +## create-react-app (PWA) + +> [create-react-app](https://github.com/facebook/create-react-app) provides +> pre-configured build process for developing front-end applications with +> [React](https://reactjs.org/). + +The ohif-viewer package can be run as a create-react-app application. This is +useful for development, debugging, or evolving the OHIF Viewer into your own +custom imaging application. + +You can read more about this particular strategy in our +[Build for Production Deployment Guide](./../deployment/recipes/build-for-production.md) + +## Rollup (Packaged Script) + +> [Rollup](https://rollupjs.org/guide/en) is a module bundler for JavaScript. It +> uses the new standardized format for code modules included in the ES6 revision +> of JavaScript. + +The [ohif-viewer](https://www.npmjs.com/package/ohif-viewer) package can be +built with Rollup to provide a set of React components which can be dropped into +a larger application. Specifically, the ohif-viewer package provides a React +component named `OHIFViewer` which is the entire viewer, configurable via React +`props`. This is useful for including the OHIF Viewer in a larger web +application, as the entire application can be provided via a `