Reduce duplicate code in @ohif/core
This commit is contained in:
parent
58b3727a2e
commit
4b532183af
@ -1,2 +0,0 @@
|
|||||||
fixes:
|
|
||||||
- "::platform/core/"
|
|
||||||
27
platform/core/.gitignore
vendored
27
platform/core/.gitignore
vendored
@ -1,27 +0,0 @@
|
|||||||
# See https://help.github.com/ignore-files/ for more about ignoring files.
|
|
||||||
|
|
||||||
# dependencies
|
|
||||||
node_modules
|
|
||||||
|
|
||||||
# builds
|
|
||||||
build
|
|
||||||
dist
|
|
||||||
.rpt2_cache
|
|
||||||
coverage/
|
|
||||||
junit.xml
|
|
||||||
|
|
||||||
# misc
|
|
||||||
.DS_Store
|
|
||||||
.env
|
|
||||||
.env.local
|
|
||||||
.env.development.local
|
|
||||||
.env.test.local
|
|
||||||
.env.production.local
|
|
||||||
package-lock.json
|
|
||||||
|
|
||||||
npm-debug.log*
|
|
||||||
yarn-debug.log*
|
|
||||||
yarn-error.log*
|
|
||||||
.idea
|
|
||||||
.yalc
|
|
||||||
yalc.lock
|
|
||||||
@ -1,20 +1,15 @@
|
|||||||
<!-- prettier-ignore-start -->
|
<!-- prettier-ignore-start -->
|
||||||
<!-- markdownlint-disable -->
|
<!-- markdownlint-disable -->
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<h1>ohif-core</h1>
|
<h1>@ohif/core</h1>
|
||||||
<p><strong>ohif-core</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>
|
<p><strong>@ohif/core</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>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
[![CircleCI][circleci-image]][circleci-url]
|
|
||||||
[![codecov][codecov-image]][codecov-url]
|
|
||||||
[](#contributors)
|
|
||||||
[![code style: prettier][prettier-image]][prettier-url]
|
|
||||||
[![semantic-release][semantic-image]][semantic-url]
|
|
||||||
|
|
||||||
[![NPM version][npm-version-image]][npm-url]
|
[![NPM version][npm-version-image]][npm-url]
|
||||||
[![NPM downloads][npm-downloads-image]][npm-url]
|
[![NPM downloads][npm-downloads-image]][npm-url]
|
||||||
|
[](#contributors)
|
||||||
[![MIT License][license-image]][license-url]
|
[![MIT License][license-image]][license-url]
|
||||||
<!-- markdownlint-enable -->
|
<!-- markdownlint-enable -->
|
||||||
<!-- prettier-ignore-end -->
|
<!-- prettier-ignore-end -->
|
||||||
@ -53,10 +48,10 @@ implementation][react-viewer].
|
|||||||
|
|
||||||
```
|
```
|
||||||
// with npm
|
// with npm
|
||||||
npm i ohif-core --save-exact
|
npm i @ohif/core --save-exact
|
||||||
|
|
||||||
// with yarn
|
// with yarn
|
||||||
yarn add ohif-core --exact
|
yarn add @ohif/core --exact
|
||||||
```
|
```
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
@ -105,31 +100,6 @@ your tests, reporting the results to your terminal. Make a pull request with
|
|||||||
your changes to `master`, and a core team member will review your work. If you
|
your changes to `master`, and a core team member will review your work. If you
|
||||||
have any questions, please don't hesitate to reach out via a GitHub issue.
|
have any questions, please don't hesitate to reach out via a GitHub issue.
|
||||||
|
|
||||||
## Issues
|
|
||||||
|
|
||||||
_Looking to contribute? Look for the [Good First Issue][good-first-issue]
|
|
||||||
label._
|
|
||||||
|
|
||||||
### 🐛 Bugs
|
|
||||||
|
|
||||||
Please file an issue for bugs, missing documentation, or unexpected behavior.
|
|
||||||
|
|
||||||
[**See Bugs**][bugs]
|
|
||||||
|
|
||||||
### 💡 Feature Requests
|
|
||||||
|
|
||||||
Please file an issue to suggest new features. Vote on feature requests by adding
|
|
||||||
a 👍. This helps maintainers prioritize what to work on.
|
|
||||||
|
|
||||||
[**See Feature Requests**][requests-feature]
|
|
||||||
|
|
||||||
### ❓ Questions
|
|
||||||
|
|
||||||
For questions related to using the library, please visit our support community,
|
|
||||||
or file an issue on GitHub.
|
|
||||||
|
|
||||||
[Google Group][google-group]
|
|
||||||
|
|
||||||
## Contributors
|
## Contributors
|
||||||
|
|
||||||
Thanks goes to these wonderful people
|
Thanks goes to these wonderful people
|
||||||
@ -155,27 +125,13 @@ Links:
|
|||||||
|
|
||||||
<!-- prettier-ignore-start -->
|
<!-- prettier-ignore-start -->
|
||||||
<!-- ROW -->
|
<!-- ROW -->
|
||||||
[all-contributors-image]: https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square
|
|
||||||
[contributing-url]: https://github.com/OHIF/ohif-core/blob/master/CONTRIBUTING.md
|
|
||||||
[circleci-image]: https://circleci.com/gh/OHIF/ohif-core.svg?style=svg
|
|
||||||
[circleci-url]: https://circleci.com/gh/OHIF/ohif-core
|
|
||||||
[codecov-image]: https://codecov.io/gh/OHIF/ohif-core/branch/master/graph/badge.svg
|
|
||||||
[codecov-url]: https://codecov.io/gh/OHIF/ohif-core
|
|
||||||
[prettier-image]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square
|
|
||||||
[prettier-url]: https://github.com/prettier/prettier
|
|
||||||
[semantic-image]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
|
|
||||||
[semantic-url]: https://github.com/semantic-release/semantic-release
|
|
||||||
<!-- ROW -->
|
|
||||||
[npm-url]: https://npmjs.org/package/ohif-core
|
[npm-url]: https://npmjs.org/package/ohif-core
|
||||||
[npm-downloads-image]: https://img.shields.io/npm/dm/ohif-core.svg?style=flat-square
|
[npm-downloads-image]: https://img.shields.io/npm/dm/ohif-core.svg?style=flat-square
|
||||||
[npm-version-image]: https://img.shields.io/npm/v/ohif-core.svg?style=flat-square
|
[npm-version-image]: https://img.shields.io/npm/v/ohif-core.svg?style=flat-square
|
||||||
|
[all-contributors-image]: https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square
|
||||||
|
[contributing-url]: https://github.com/OHIF/ohif-core/blob/master/CONTRIBUTING.md
|
||||||
[license-image]: https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square
|
[license-image]: https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square
|
||||||
[license-url]: LICENSE
|
[license-url]: LICENSE
|
||||||
<!-- Misc. -->
|
<!-- Misc. -->
|
||||||
[react-viewer]: https://github.com/OHIF/Viewers/tree/react
|
[react-viewer]: https://github.com/OHIF/Viewers/tree/react
|
||||||
<!-- Issue Boilerplate -->
|
|
||||||
[bugs]: https://github.com/OHIF/ohif-core/labels/bug
|
|
||||||
[requests-feature]: https://github.com/OHIF/ohif-core/labels/enhancement
|
|
||||||
[good-first-issue]: https://github.com/OHIF/ohif-core/labels/good%20first%20issue
|
|
||||||
[google-group]: https://groups.google.com/forum/#!forum/cornerstone-platform
|
|
||||||
<!-- prettier-ignore-end -->
|
<!-- prettier-ignore-end -->
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "@ohif/core",
|
"name": "@ohif/core",
|
||||||
"version": "0.11.1-alpha.0",
|
"version": "0.11.1-alpha.0",
|
||||||
"description": "Useful functions and classes for building web-based medical imaging applications",
|
"description": "Generic business logic for web-based medical imaging applications",
|
||||||
"author": "OHIF Contributors",
|
"author": "OHIF Core Team",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": "OHIF/Viewers",
|
"repository": "OHIF/Viewers",
|
||||||
"main": "dist/index.umd.js",
|
"main": "dist/index.umd.js",
|
||||||
@ -16,14 +16,15 @@
|
|||||||
"npm": ">=5"
|
"npm": ">=5"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"start": "yarn run dev",
|
||||||
|
"dev": "jest --watch",
|
||||||
|
"dev:core": "yarn run dev",
|
||||||
"test:unit": "jest --watch",
|
"test:unit": "jest --watch",
|
||||||
"test:unit:ci": "jest --ci --runInBand --collectCoverage",
|
"test:unit:ci": "jest --ci --runInBand --collectCoverage",
|
||||||
"build": "rollup -c",
|
"build": "webpack --config config/webpack.prod.js -d",
|
||||||
"lerna:build": "webpack --config config/webpack.prod.js -w -d",
|
"build:package": "yarn run build",
|
||||||
"dev": "jest --watch",
|
|
||||||
"start": "rollup -c -w",
|
|
||||||
"lint": "eslint -c .eslintrc --fix src && prettier --single-quote --write src/**/*.{js,jsx,json,css}",
|
"lint": "eslint -c .eslintrc --fix src && prettier --single-quote --write src/**/*.{js,jsx,json,css}",
|
||||||
"prepublishOnly": "npm run build"
|
"prepublishOnly": "yarn run build"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"cornerstone-core": "^2.2.8",
|
"cornerstone-core": "^2.2.8",
|
||||||
@ -41,44 +42,8 @@
|
|||||||
"mousetrap": "^1.6.3",
|
"mousetrap": "^1.6.3",
|
||||||
"validate.js": "^0.12.0"
|
"validate.js": "^0.12.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
|
||||||
"@svgr/rollup": "^4.1.0",
|
|
||||||
"babel-eslint": "10.0.1",
|
|
||||||
"babel-jest": "^24.7.1",
|
|
||||||
"commitizen": "3.1.x",
|
|
||||||
"cross-env": "^5.2.0",
|
|
||||||
"cz-conventional-changelog": "2.1.x",
|
|
||||||
"eslint": "5.13.0",
|
|
||||||
"eslint-config-prettier": "^4.3.0",
|
|
||||||
"eslint-plugin-import": "^2.14.0",
|
|
||||||
"eslint-plugin-node": "^8.0.0",
|
|
||||||
"eslint-plugin-prettier": "^3.1.0",
|
|
||||||
"eslint-plugin-promise": "^4.0.1",
|
|
||||||
"husky": "^1.2.1",
|
|
||||||
"jest": "^24.7.1",
|
|
||||||
"jest-junit": "^6.3.0",
|
|
||||||
"lint-staged": "^8.1.0",
|
|
||||||
"prettier": "^1.15.3",
|
|
||||||
"redux-testkit": "^1.0.6",
|
|
||||||
"rollup": "^1.1.2",
|
|
||||||
"rollup-plugin-babel": "^4.1.0",
|
|
||||||
"rollup-plugin-commonjs": "^9.2.0",
|
|
||||||
"rollup-plugin-json": "^4.0.0",
|
|
||||||
"rollup-plugin-node-resolve": "^4.0.0",
|
|
||||||
"rollup-plugin-peer-deps-external": "^2.2.0",
|
|
||||||
"rollup-plugin-postcss": "^2.0.3",
|
|
||||||
"rollup-plugin-url": "^2.1.0",
|
|
||||||
"semantic-release": "15.13.x",
|
|
||||||
"stylelint": "^9.9.0",
|
|
||||||
"stylelint-config-recommended": "^2.1.0",
|
|
||||||
"stylus": "^0.54.5"
|
|
||||||
},
|
|
||||||
"files": [
|
"files": [
|
||||||
"dist"
|
"dist",
|
||||||
],
|
"README.md"
|
||||||
"config": {
|
]
|
||||||
"commitizen": {
|
|
||||||
"path": "./node_modules/cz-conventional-changelog"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,64 +0,0 @@
|
|||||||
import babel from 'rollup-plugin-babel'
|
|
||||||
import commonjs from 'rollup-plugin-commonjs'
|
|
||||||
import external from 'rollup-plugin-peer-deps-external'
|
|
||||||
import postcss from 'rollup-plugin-postcss'
|
|
||||||
import resolve from 'rollup-plugin-node-resolve'
|
|
||||||
import url from 'rollup-plugin-url'
|
|
||||||
import json from 'rollup-plugin-json'
|
|
||||||
import svgr from '@svgr/rollup'
|
|
||||||
import pkg from './package.json'
|
|
||||||
|
|
||||||
const globals = {
|
|
||||||
'react': 'React',
|
|
||||||
'react-dom': 'ReactDOM',
|
|
||||||
'cornerstone-core': 'cornerstone',
|
|
||||||
'cornerstone-math': 'cornerstoneMath',
|
|
||||||
'cornerstone-tools': 'cornerstoneTools',
|
|
||||||
'cornerstone-wado-image-loader': 'cornerstoneWADOImageLoader',
|
|
||||||
'dicom-parser': 'dicomParser'
|
|
||||||
};
|
|
||||||
|
|
||||||
export default {
|
|
||||||
input: 'src/index.js',
|
|
||||||
output: [
|
|
||||||
{
|
|
||||||
file: pkg.main,
|
|
||||||
format: 'umd',
|
|
||||||
name: 'OHIF',
|
|
||||||
sourcemap: true,
|
|
||||||
exports: 'named',
|
|
||||||
globals
|
|
||||||
},
|
|
||||||
{
|
|
||||||
file: pkg.module,
|
|
||||||
format: 'es',
|
|
||||||
sourcemap: true,
|
|
||||||
exports: 'named',
|
|
||||||
globals
|
|
||||||
},
|
|
||||||
],
|
|
||||||
plugins: [
|
|
||||||
external(),
|
|
||||||
postcss({
|
|
||||||
modules: false
|
|
||||||
}),
|
|
||||||
url(),
|
|
||||||
json(),
|
|
||||||
svgr(),
|
|
||||||
babel({
|
|
||||||
exclude: 'node_modules/**',
|
|
||||||
externalHelpers: false,
|
|
||||||
runtimeHelpers: true
|
|
||||||
}),
|
|
||||||
resolve(),
|
|
||||||
commonjs({
|
|
||||||
include: 'node_modules/**',
|
|
||||||
namedExports: {
|
|
||||||
'node_modules/dicomweb-client/build/dicomweb-client.js': [
|
|
||||||
'api'
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
external: Object.keys(pkg.peerDependencies || {}),
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user