Clean duplicate code in UI project

This commit is contained in:
dannyrb committed 2019-08-06 14:22:44 -04:00
1 parent 60f48fbdc0
commit e47dcf27fc
11 files changed
+57 -217

No files matched your search

-85
View File
@@ -1,85 +0,0 @@
version: 2
### 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
-2
View File
@@ -1,2 +0,0 @@
fixes:
- "::platform/ui/"
-40
View File
@@ -1,40 +0,0 @@
---
name: "\U0001F41B Bug report"
about: Create a report to help us improve
title: ''
labels: 'Bug Report :bug:'
assignees: ''
---
**Before Creating an issue**
- Are you running the latest version?
- Are you reporting to the correct repository?
- Did you search existing issues?
**Describe the bug**
*A clear and concise description of what the bug is.*
**Steps To Reproduce**
1. [First Step]
2. [Second Step]
3. ...
```
Please use code blocks to show formatted errors or code snippets
```
**Expected behavior**
*A clear and concise description of what you expected to happen.*
**Environment**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Additional context**
@@ -1,18 +0,0 @@
---
name: "\U0001F680 Feature request"
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''
---
## Awesome, do you have an idea? 😍
If you have a **feature request, improvement or idea**, check [our official roadmap](https://github.com/OHIF/react-viewerbase/projects) to see if it is already planned!
### 👉 &nbsp; [Go to Roadmap](https://github.com/OHIF/react-viewerbase/projects)
If your feature request isn't there, continue with this issue and we can discuss it 🤟
Please include the reasons why you think your change should be made, and any supporting evidence that helps us asses its value and priority.
@@ -1,15 +0,0 @@
---
name: "\U0001F917 Support Question"
about: "I have a question \U0001F4AC"
title: ''
labels: question
assignees: ''
---
We are a small team with limited resources. Your question is much more likely to be answered if it is [a good question](https://stackoverflow.com/help/how-to-ask)
**Description**
Questions can often be answered by our documentation. Unable to find an answer in our docs? We'll try to help. In the meantime, if you answer your own question, please respond with the answer here so that others may benefit as well. Better yet, open a PR to expand our docs ^_^
-8
View File
@@ -1,8 +0,0 @@
{
"recommendations": [
"esbenp.prettier-vscode",
"sysoev.language-stylus",
"silvenon.mdx",
"dbaeumer.vscode-eslint"
]
}
-29
View File
@@ -1,29 +0,0 @@
{
"editor.rulers": [80, 120],
// ===
// Spacing
// ===
"editor.insertSpaces": true,
"editor.tabSize": 2,
"editor.trimAutoWhitespace": true,
"files.trimTrailingWhitespace": true,
"files.eol": "\n",
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
// ===
// Event Triggers
// ===
"editor.formatOnSave": true,
"eslint.autoFixOnSave": true,
"eslint.run": "onSave",
"eslint.validate": [
{ "language": "javascript", "autoFix": true },
{ "language": "javascriptreact", "autoFix": true }
],
"prettier.disableLanguages": [],
"prettier.endOfLine": "lf"
}
+34 -72
View File
@@ -3,48 +3,44 @@
* https://www.docz.site/docs/project-configuration
*/
import { css } from 'docz-plugin-css';
import { css } from "docz-plugin-css";
export default {
dest: 'example/build',
public: '/public',
wrapper: 'src/__docs__/wrapper',
indexHtml: 'src/__docs__/index.html',
dest: "example/build",
public: "/public",
wrapper: "src/__docs__/wrapper",
indexHtml: "src/__docs__/index.html",
// Limited support for importing `.styl` files
codeSandbox: false,
// https://github.com/pedronauck/docz/pull/849/files
// Because we re-export using `index.js` files
notUseSpecifiers: true,
// filterComponents: files =>
// files.filter(filepath =>
// /\/[A-Z]\w*(\/index)?\.(js|jsx|ts|tsx)$/.test(filepath)
// ),
menu: [
'Introduction',
'Getting Started',
{ name: 'Elements', menu: ['Form / Select'] },
"Introduction",
"Getting Started",
{ name: "Elements", menu: ["Form / Select"] },
{
name: 'Components',
name: "Components",
menu: [
'CINE Dialog',
'Layout Button',
'Measurement Table',
'Overlay Trigger',
'Quick Switch',
'Rounded Button Group',
'Select Tree',
'Simple Dialog',
'Study Browser',
'Study List',
'Table List',
'Toolbar Section',
'About Modal',
'User Preferences Modal',
],
"CINE Dialog",
"Layout Button",
"Measurement Table",
"Overlay Trigger",
"Quick Switch",
"Rounded Button Group",
"Select Tree",
"Simple Dialog",
"Study Browser",
"Study List",
"Table List",
"Toolbar Section",
"About Modal",
"User Preferences Modal"
]
},
'Styling & Theming',
'Translating',
'Compatibility',
"Styling & Theming",
"Translating",
"Compatibility"
],
// Rollup Aliases?
// https://github.com/pedronauck/docz/issues/373
@@ -53,9 +49,9 @@ export default {
css(),
// Stylus
css({
preprocessor: 'stylus',
cssmodules: false,
}),
preprocessor: "stylus",
cssmodules: false
})
],
// `docz` uses file-loader to pull in SVGs. This kills our icons before
// They can be picked up by our `babel-plugin-inline-react-svg` dependency
@@ -64,50 +60,16 @@ export default {
// How we delete our rule:
// https://github.com/neutrinojs/webpack-chain/issues/48
onCreateWebpackChain: config => {
config.module.rules.delete('svg');
// config.module
// .rule('svg')
// .test(/\.(svg)(\?.*)?$/)
// .use('file-loader')
// .loader(require.resolve('file-loader'))
// .options({
// name: `static/img/[name].[ext]`,
// })
config.module.rules.delete("svg");
},
modifyBabelRc: babelrc => {
const newBabelRc = {
...babelrc,
plugins: [
...babelrc.plugins,
require.resolve('babel-plugin-inline-react-svg'),
],
require.resolve("babel-plugin-inline-react-svg")
]
};
return newBabelRc;
},
}
};
/*
* Alternative ways to extend/modify underlying webpack config
*
modifyBundlerConfig: (config) => {
config.module.rules.push({
test: /\.scss$/,
use: ["style-loader", "css-loader", "sass-loader"]
})
return config
}
*
*
*
onCreateWebpackChain: config => {
config.module
.rule('css')
.test(/\.css$/)
.use('css-loader')
.loader('css-loader')
.options({ sourceMap: false,
importLoaders: 2 })
}
*/
-21
View File
@@ -1,21 +0,0 @@
# https://www.netlify.com/docs/continuous-deployment/#deploy-contexts
#
# Global settings applied to the whole site.
#
# “base” is the directory to change to before starting build. If you set base:
# that is where we will look for package.json/.nvmrc/etc, not repo root!
# “command” is your build command.
# “publish” is the directory to publish (relative to the root of your repo).
# COMMENT: NODE_VERSION in root `.nvmrc` takes priority
# COMMENT: Why we specify YARN_FLAGS: https://www.netlify.com/docs/build-gotchas/#yarn
[build.environment]
NODE_VERSION = "10.15.3"
YARN_VERSION = "1.15.2"
YARN_FLAGS = "--no-ignore-optional --pure-lockfile"
# COMMENT: This a rule for Single Page Applications
[[redirects]]
from = "/*"
to = "/index.html"
status = 200