Merge build and restore sections
This commit is contained in:
parent
d844308e32
commit
8e4b0ac737
@ -1,32 +0,0 @@
|
|||||||
# OHIF Viewer (React Version)
|
|
||||||
|
|
||||||
Disclaimer: Work in Progress
|
|
||||||
|
|
||||||
## To run locally
|
|
||||||
|
|
||||||
1. `yarn install`
|
|
||||||
1. `yarn start`
|
|
||||||
1. `Go to http://localhost:5000`
|
|
||||||
|
|
||||||
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`
|
|
||||||
|
|
||||||
### 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)
|
|
||||||
@ -36,7 +36,8 @@
|
|||||||
- [Stand-alone](deployment/index.md#stand-alone-viewer)
|
- [Stand-alone](deployment/index.md#stand-alone-viewer)
|
||||||
- [Data]()
|
- [Data]()
|
||||||
- Recipes
|
- Recipes
|
||||||
- [Embedding the Viewer](deployment/recipes/embedded-viewer.md))
|
- [Embedding the Viewer](deployment/recipes/embedded-viewer.md)
|
||||||
|
- [Build for Production](deployment/recipes/build-for-production.md)
|
||||||
- [PWA: Static]()
|
- [PWA: Static]()
|
||||||
- [PWA: Docker]()
|
- [PWA: Docker]()
|
||||||
- [PWA: Nginx + Orthanc]()
|
- [PWA: Nginx + Orthanc]()
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
# Build for Production
|
# Build for Production
|
||||||
|
|
||||||
Note about setting up for contributing, then skip X
|
> If you've already followed the
|
||||||
|
> ["Getting Started" Guide](/essentials/getting-started.md), you can skip ahead
|
||||||
|
> to [Configuration](#configuration)
|
||||||
|
|
||||||
## Overview?
|
## Overview?
|
||||||
|
|
||||||
@ -10,11 +12,11 @@ Note about setting up for contributing, then skip X
|
|||||||
- [Yarn](https://yarnpkg.com/lang/en/docs/install/)
|
- [Yarn](https://yarnpkg.com/lang/en/docs/install/)
|
||||||
- [Git](https://www.atlassian.com/git/tutorials/install-git)
|
- [Git](https://www.atlassian.com/git/tutorials/install-git)
|
||||||
|
|
||||||
### Get a Copy of the source
|
### Getting the Code
|
||||||
|
|
||||||
_With Git:_
|
_With Git:_
|
||||||
|
|
||||||
```shell
|
```bash
|
||||||
# Clone the remote repository to your local machine
|
# Clone the remote repository to your local machine
|
||||||
git clone https://github.com/OHIF/Viewers.git
|
git clone https://github.com/OHIF/Viewers.git
|
||||||
|
|
||||||
@ -29,11 +31,35 @@ _From .zip:_
|
|||||||
|
|
||||||
[OHIF/Viewers: react.zip](https://github.com/OHIF/Viewers/archive/react.zip)
|
[OHIF/Viewers: react.zip](https://github.com/OHIF/Viewers/archive/react.zip)
|
||||||
|
|
||||||
### Restore Dependencies?
|
### Restore Dependencies & Build
|
||||||
|
|
||||||
...
|
Open PowerShell, Terminal, or a Command Prompt, and navigate to the directory
|
||||||
|
containing the source files. Next run these commands:
|
||||||
|
|
||||||
### Configure?
|
```js
|
||||||
|
// Restore dependencies
|
||||||
|
yarn install
|
||||||
|
|
||||||
|
// Build source code for production
|
||||||
|
yarn run build:web
|
||||||
|
```
|
||||||
|
|
||||||
|
If everything worked as expected, you should have a new `build/` directory in
|
||||||
|
the project's folder. It should roughly resemble the following:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
build
|
||||||
|
├── config/
|
||||||
|
├── static/
|
||||||
|
├── index.html
|
||||||
|
├── manifest.json
|
||||||
|
├── service-worker.js
|
||||||
|
└── ...
|
||||||
|
```
|
||||||
|
|
||||||
|
These files can be hosted using
|
||||||
|
|
||||||
|
### Configuration
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|
||||||
@ -41,18 +67,6 @@ _From .zip:_
|
|||||||
- `REACT_APP_*`
|
- `REACT_APP_*`
|
||||||
- config file(s)
|
- config file(s)
|
||||||
|
|
||||||
### Build
|
|
||||||
|
|
||||||
From your projects
|
|
||||||
|
|
||||||
```js
|
|
||||||
yarn run build:web
|
|
||||||
```
|
|
||||||
|
|
||||||
```js
|
|
||||||
file tree of project, highlighting contents in `/buld`
|
|
||||||
```
|
|
||||||
|
|
||||||
## Next Steps
|
## Next Steps
|
||||||
|
|
||||||
### Deploying our Production Build
|
### Deploying our Production Build
|
||||||
@ -71,6 +85,12 @@ web application. For a starting point, check out this repository's own use of:
|
|||||||
[generateStaticSite.sh][generatestaticsite.sh]
|
[generateStaticSite.sh][generatestaticsite.sh]
|
||||||
- [Semantic-Release][semantic-release]: [.releaserc][releaserc]
|
- [Semantic-Release][semantic-release]: [.releaserc][releaserc]
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
> Issues and resolutions for common GitHub issues will be summarized here
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
<!-- prettier-ignore-start -->
|
<!-- prettier-ignore-start -->
|
||||||
[circleci]: https://circleci.com/gh/OHIF/Viewers
|
[circleci]: https://circleci.com/gh/OHIF/Viewers
|
||||||
[circleci-config]: https://github.com/OHIF/Viewers/blob/react/.circleci/config.yml
|
[circleci-config]: https://github.com/OHIF/Viewers/blob/react/.circleci/config.yml
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user