This repository has been archived by the owner on Aug 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from dannyrb/chore/clean-docs
Chore/clean docs
- Loading branch information
Showing
2 changed files
with
108 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# Use the latest 2.1 version of CircleCI pipeline processing engine, see https://circleci.com/docs/2.0/configuration-reference/ | ||
version: 2.1 | ||
|
||
### ABOUT | ||
# | ||
# This configuration powers our Circleci.io integration | ||
# | ||
# Note: | ||
# Netlify works independently from this configuration to | ||
# create pull request previews and to update `https://react.ohif.org` | ||
### | ||
|
||
defaults: &defaults | ||
working_directory: ~/repo | ||
docker: | ||
- image: circleci/node:10.15.1 | ||
|
||
jobs: | ||
build_and_test: | ||
<<: *defaults | ||
steps: | ||
# Download and cache dependencies | ||
- checkout | ||
- restore_cache: | ||
name: Restore Yarn Package Cache | ||
keys: | ||
# when lock file changes, use increasingly general patterns to restore cache | ||
- yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }} | ||
- yarn-packages-v1-{{ .Branch }}- | ||
- yarn-packages-v1- | ||
- run: | ||
name: Install Dependencies | ||
command: yarn install --frozen-lockfile | ||
- save_cache: | ||
name: Save Yarn Package Cache | ||
paths: | ||
- ~/.cache/yarn | ||
key: yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }} | ||
|
||
# Build & Test | ||
- run: yarn build | ||
- run: yarn test | ||
|
||
# Persist :+1: | ||
- persist_to_workspace: | ||
root: ~/repo | ||
paths: . | ||
|
||
npm_publish: | ||
<<: *defaults | ||
steps: | ||
- attach_workspace: | ||
at: ~/repo | ||
- run: | ||
name: Avoid hosts unknown for github | ||
command: | ||
mkdir ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking | ||
no\n" > ~/.ssh/config | ||
- run: | ||
name: Publish using Semantic Release | ||
command: npx semantic-release | ||
|
||
workflows: | ||
version: 2 | ||
|
||
# PULL REQUESTS | ||
pull_requests: | ||
jobs: | ||
- build_and_test: | ||
filters: | ||
branches: | ||
ignore: | ||
- master | ||
- feature/* | ||
- hotfix/* | ||
|
||
# MERGE TO MASTER | ||
cut_release: | ||
jobs: | ||
- build_and_test: | ||
filters: | ||
branches: | ||
only: master | ||
- npm_publish: | ||
requires: | ||
- build_and_test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,31 @@ | ||
# react-viewerbase | ||
<!-- prettier-ignore-start --> | ||
<!-- markdownlint-disable --> | ||
<div align="center"> | ||
<h1>ohif-core</h1> | ||
|
||
> A set of React components for Medical Imaging Viewers. | ||
<p><strong>ohif-cre</strong> is a collection of useful functions and classes for building web-based medical imaging applications. This library helps power OHIF's <a href="https://github.com/OHIF/Viewers">zero-footprint DICOM viewer</a>.</p> | ||
</div> | ||
|
||
*Status: Under development* | ||
<div align="center"> | ||
<a href="https://react.ohif.org/"><strong>Read The Docs</strong></a> | | ||
<a href="https://react.ohif.org/contributing">Edit the docs</a> | ||
</div> | ||
|
||
[![NPM](https://img.shields.io/npm/v/react-viewerbase.svg)](https://www.npmjs.com/package/react-viewerbase) | ||
<hr /> | ||
|
||
## Install | ||
[![CircleCI][circleci-image]][circleci-url] | ||
|
||
```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 /> | ||
) | ||
} | ||
} | ||
``` | ||
|
||
## To run locally | ||
1. Clone this repository | ||
1. `cd react-viewerbase` | ||
1. `yarn i` | ||
1. `yarn start` | ||
1. in new termainal | ||
1. `cd example` | ||
1. `yarn i` | ||
1. `yarn start` | ||
<!-- markdownlint-enable --> | ||
<!-- prettier-ignore-end --> | ||
|
||
## License | ||
|
||
MIT © [OHIF](https://github.com/OHIF) | ||
|
||
<!-- | ||
Links: | ||
--> | ||
|
||
<!-- prettier-ignore-start --> | ||
[circleci-image]: https://circleci.com/gh/OHIF/ohif-core.svg?style=svg | ||
[circleci-url]: https://circleci.com/gh/OHIF/ohif-core |