chore: Switch to monorepo setup for Netlify deploys
- fix font duplications, removed some unused webpack settings
This commit is contained in:
parent
714e18e482
commit
22656307ea
@ -33,18 +33,20 @@ annotating, and reporting on DICOM images in 2D (slices) and 3D (volumes).
|
|||||||
of our medical image web viewers from the start. The summary of changes include:
|
of our medical image web viewers from the start. The summary of changes include:
|
||||||
|
|
||||||
- Addition of workflow modes
|
- Addition of workflow modes
|
||||||
|
- Often, medical imaging use cases involves lots of specific workflows that
|
||||||
- Often, medical imaging use cases involves lots of specific workflows that re-use
|
re-use functionalities. We have added the capability of workflow modes, that
|
||||||
functionalities. We have added the capability of workflow modes, that enable people
|
enable people to customize user interface and configure application for
|
||||||
to customize user interface and configure application for specific workflow.
|
specific workflow.
|
||||||
- The idea is to re-use the functionalities that extensions provide and create a workflow.
|
- The idea is to re-use the functionalities that extensions provide and create
|
||||||
Brain segmentation workflow is different from prostate segmentation in UI for sure; however, they share the segmentation tools that can be re-used.
|
a workflow. Brain segmentation workflow is different from prostate
|
||||||
- Our vision is that technical people focus of developing extensions which provides
|
segmentation in UI for sure; however, they share the segmentation tools that
|
||||||
core functionalities, and experts to build modes by picking the appropriate functionalities
|
can be re-used.
|
||||||
from each extension.
|
- Our vision is that technical people focus of developing extensions which
|
||||||
|
provides core functionalities, and experts to build modes by picking the
|
||||||
|
appropriate functionalities from each extension.
|
||||||
|
|
||||||
* Redux store has been removed from the viewer, and a cleaner, more powerful
|
* Redux store has been removed from the viewer, and a cleaner, more powerful
|
||||||
* tailwind CSS
|
* Tailwind CSS
|
||||||
* End-to-end test suite
|
* End-to-end test suite
|
||||||
|
|
||||||
Below, you can find the gap analysis between the `OHIF-v2` and `OHIF-v3`:
|
Below, you can find the gap analysis between the `OHIF-v2` and `OHIF-v3`:
|
||||||
|
|||||||
@ -33,7 +33,7 @@ const isDev = process.env.NODE_ENV === 'development';
|
|||||||
const isDeployPreview =
|
const isDeployPreview =
|
||||||
process.env.NETLIFY && process.env.CONTEXT === 'deploy-preview';
|
process.env.NETLIFY && process.env.CONTEXT === 'deploy-preview';
|
||||||
|
|
||||||
const baseUrl = process.env.BASE_URL || '/docs/';
|
const baseUrl = process.env.BASE_URL || '/';
|
||||||
const isBootstrapPreset = process.env.DOCUSAURUS_PRESET === 'bootstrap';
|
const isBootstrapPreset = process.env.DOCUSAURUS_PRESET === 'bootstrap';
|
||||||
|
|
||||||
// Special deployment for staging locales until they get enough translations
|
// Special deployment for staging locales until they get enough translations
|
||||||
@ -59,9 +59,9 @@ const isI18nStaging = process.env.I18N_STAGING === 'true';
|
|||||||
['en']
|
['en']
|
||||||
: isI18nStaging
|
: isI18nStaging
|
||||||
? // Staging locales: https://docusaurus-i18n-staging.netlify.app/
|
? // Staging locales: https://docusaurus-i18n-staging.netlify.app/
|
||||||
['en', 'ja']
|
['en']
|
||||||
: // Production locales
|
: // Production locales
|
||||||
['en', 'fr', 'ko', 'zh-CN'],
|
['en'],
|
||||||
},
|
},
|
||||||
onBrokenLinks: 'warn',
|
onBrokenLinks: 'warn',
|
||||||
onBrokenMarkdownLinks: 'warn',
|
onBrokenMarkdownLinks: 'warn',
|
||||||
@ -122,7 +122,7 @@ const isI18nStaging = process.env.I18N_STAGING === 'true';
|
|||||||
'queryString',
|
'queryString',
|
||||||
],
|
],
|
||||||
// swRegister: false,
|
// swRegister: false,
|
||||||
swCustom: path.resolve(__dirname, 'src/sw.js'),
|
// swCustom: path.resolve(__dirname, 'src/sw.js'),
|
||||||
pwaHead: [
|
pwaHead: [
|
||||||
{
|
{
|
||||||
tagName: 'link',
|
tagName: 'link',
|
||||||
|
|||||||
38
platform/docs/netlify.toml
Normal file
38
platform/docs/netlify.toml
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
# Netlify Config
|
||||||
|
#
|
||||||
|
# TOML Reference:
|
||||||
|
# https://www.netlify.com/docs/netlify-toml-reference/
|
||||||
|
#
|
||||||
|
# We use Netlify for deploy previews and for publishing docs (gh-pages branch).
|
||||||
|
# https://viewer.ohif.org is created using a different process that is
|
||||||
|
# managed by CircleCI and deployed to our Google Hosting
|
||||||
|
#
|
||||||
|
|
||||||
|
#[build]
|
||||||
|
# ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF"
|
||||||
|
|
||||||
|
# NODE_VERSION in root `.nvmrc` takes priority
|
||||||
|
# YARN_FLAGS: https://www.netlify.com/docs/build-gotchas/#yarn
|
||||||
|
[build.environment]
|
||||||
|
# If 'production', `yarn install` does not install devDependencies
|
||||||
|
NODE_ENV = "development"
|
||||||
|
NODE_VERSION = "12.13.0"
|
||||||
|
YARN_VERSION = "1.22.0"
|
||||||
|
RUBY_VERSION = "2.6.2"
|
||||||
|
YARN_FLAGS = "--no-ignore-optional --pure-lockfile"
|
||||||
|
NETLIFY_USE_YARN = "true"
|
||||||
|
|
||||||
|
[[headers]]
|
||||||
|
# Define which paths this specific [[headers]] block will cover.
|
||||||
|
for = "/*"
|
||||||
|
|
||||||
|
[headers.values]
|
||||||
|
X-Frame-Options = "DENY"
|
||||||
|
X-XSS-Protection = "1; mode=block"
|
||||||
|
|
||||||
|
# Multi-key header rules are expressed with multi-line strings.
|
||||||
|
cache-control = '''
|
||||||
|
max-age=0,
|
||||||
|
no-cache,
|
||||||
|
no-store,
|
||||||
|
must-revalidate'''
|
||||||
@ -11,5 +11,5 @@ export default {
|
|||||||
// 'Other',
|
// 'Other',
|
||||||
],
|
],
|
||||||
ignore: ['README.md'],
|
ignore: ['README.md'],
|
||||||
base: '/ui/',
|
base: '/',
|
||||||
};
|
};
|
||||||
|
|||||||
40
platform/ui/netlify.toml
Normal file
40
platform/ui/netlify.toml
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
# Netlify Config
|
||||||
|
#
|
||||||
|
# TOML Reference:
|
||||||
|
# https://www.netlify.com/docs/netlify-toml-reference/
|
||||||
|
#
|
||||||
|
# We use Netlify for deploy previews and for publishing docs (gh-pages branch).
|
||||||
|
# https://viewer.ohif.org is created using a different process that is
|
||||||
|
# managed by CircleCI and deployed to our Google Hosting
|
||||||
|
#
|
||||||
|
|
||||||
|
[build]
|
||||||
|
base = ""
|
||||||
|
publish = ".docz/dist"
|
||||||
|
ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../i18n/"
|
||||||
|
|
||||||
|
# NODE_VERSION in root `.nvmrc` takes priority
|
||||||
|
# YARN_FLAGS: https://www.netlify.com/docs/build-gotchas/#yarn
|
||||||
|
[build.environment]
|
||||||
|
# If 'production', `yarn install` does not install devDependencies
|
||||||
|
NODE_ENV = "development"
|
||||||
|
NODE_VERSION = "12.13.0"
|
||||||
|
YARN_VERSION = "1.22.0"
|
||||||
|
RUBY_VERSION = "2.6.2"
|
||||||
|
YARN_FLAGS = "--no-ignore-optional --pure-lockfile"
|
||||||
|
NETLIFY_USE_YARN = "true"
|
||||||
|
|
||||||
|
[[headers]]
|
||||||
|
# Define which paths this specific [[headers]] block will cover.
|
||||||
|
for = "/*"
|
||||||
|
|
||||||
|
[headers.values]
|
||||||
|
X-Frame-Options = "DENY"
|
||||||
|
X-XSS-Protection = "1; mode=block"
|
||||||
|
|
||||||
|
# Multi-key header rules are expressed with multi-line strings.
|
||||||
|
cache-control = '''
|
||||||
|
max-age=0,
|
||||||
|
no-cache,
|
||||||
|
no-store,
|
||||||
|
must-revalidate'''
|
||||||
@ -20,7 +20,6 @@
|
|||||||
"start": "yarn run dev",
|
"start": "yarn run dev",
|
||||||
"build": "docz build",
|
"build": "docz build",
|
||||||
"build:ui:ci": "docz build",
|
"build:ui:ci": "docz build",
|
||||||
"build:ui:deploy-preview": "docz build --base=/ui/",
|
|
||||||
"dev": "docz dev",
|
"dev": "docz dev",
|
||||||
"serve": "docz serve",
|
"serve": "docz serve",
|
||||||
"docs:preview": "yarn run dev"
|
"docs:preview": "yarn run dev"
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
@tailwind utilities;
|
@tailwind utilities;
|
||||||
|
|
||||||
/* IMPORT CUSTOM FONT */
|
/* IMPORT CUSTOM FONT */
|
||||||
@import url('https://fonts.googleapis.com/css?family=Lato:300,400,700&display=swap');
|
@import url('https://fonts.googleapis.com/css?family=Lato:100,300,400,500,700&display=swap');
|
||||||
|
|
||||||
/* Trincate 2 lines utility */
|
/* Trincate 2 lines utility */
|
||||||
.truncate-2-lines {
|
.truncate-2-lines {
|
||||||
|
|||||||
@ -2,7 +2,7 @@ module.exports = {
|
|||||||
prefix: '',
|
prefix: '',
|
||||||
important: false,
|
important: false,
|
||||||
separator: ':',
|
separator: ':',
|
||||||
purge: ['./src/**/*.jsx'],
|
//purge: ['./src/**/*.jsx'],
|
||||||
theme: {
|
theme: {
|
||||||
screens: {
|
screens: {
|
||||||
sm: '640px',
|
sm: '640px',
|
||||||
|
|||||||
@ -12,8 +12,6 @@ const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|||||||
const ExtractCssChunksPlugin = require('extract-css-chunks-webpack-plugin');
|
const ExtractCssChunksPlugin = require('extract-css-chunks-webpack-plugin');
|
||||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||||
const { InjectManifest } = require('workbox-webpack-plugin');
|
const { InjectManifest } = require('workbox-webpack-plugin');
|
||||||
const TerserJSPlugin = require('terser-webpack-plugin');
|
|
||||||
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
|
||||||
// ~~ Rules
|
// ~~ Rules
|
||||||
const extractStyleChunksRule = require('./rules/extractStyleChunks.js');
|
const extractStyleChunksRule = require('./rules/extractStyleChunks.js');
|
||||||
// ~~ Directories
|
// ~~ Directories
|
||||||
|
|||||||
@ -10,8 +10,10 @@
|
|||||||
|
|
||||||
[build]
|
[build]
|
||||||
base = ""
|
base = ""
|
||||||
publish = ".netlify/www/"
|
build = "yarn run build:viewer:ci"
|
||||||
command = ".netlify/build-deploy-preview.sh"
|
publish = "dist"
|
||||||
|
ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../ui/ ../core/ ../i18n/"
|
||||||
|
|
||||||
|
|
||||||
# NODE_VERSION in root `.nvmrc` takes priority
|
# NODE_VERSION in root `.nvmrc` takes priority
|
||||||
# YARN_FLAGS: https://www.netlify.com/docs/build-gotchas/#yarn
|
# YARN_FLAGS: https://www.netlify.com/docs/build-gotchas/#yarn
|
||||||
@ -22,12 +24,7 @@
|
|||||||
YARN_VERSION = "1.22.0"
|
YARN_VERSION = "1.22.0"
|
||||||
RUBY_VERSION = "2.6.2"
|
RUBY_VERSION = "2.6.2"
|
||||||
YARN_FLAGS = "--no-ignore-optional --pure-lockfile"
|
YARN_FLAGS = "--no-ignore-optional --pure-lockfile"
|
||||||
NETLIFY_RESTORE = "1"
|
NETLIFY_USE_YARN = "true"
|
||||||
|
|
||||||
# Production context: all deploys from the Production branch set in your site's
|
|
||||||
# deploy contexts will inherit these settings.
|
|
||||||
[context.production]
|
|
||||||
ignore = "exit 0" # Never build production; We'll let our CI do that
|
|
||||||
|
|
||||||
[[headers]]
|
[[headers]]
|
||||||
# Define which paths this specific [[headers]] block will cover.
|
# Define which paths this specific [[headers]] block will cover.
|
||||||
@ -18,7 +18,7 @@
|
|||||||
"proxy": "http://localhost:8042",
|
"proxy": "http://localhost:8042",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build:viewer": "cross-env NODE_ENV=production node --max_old_space_size=4096 ./../../node_modules/webpack/bin/webpack.js --config .webpack/webpack.pwa.js --progress",
|
"build:viewer": "cross-env NODE_ENV=production node --max_old_space_size=4096 ./../../node_modules/webpack/bin/webpack.js --config .webpack/webpack.pwa.js --progress",
|
||||||
"build:viewer:ci": "cross-env NODE_ENV=production PUBLIC_URL=/pwa/ APP_CONFIG=config/netlify.js QUICK_BUILD=true node --max_old_space_size=4096 ./../../node_modules/webpack/bin/webpack.js --config .webpack/webpack.pwa.js",
|
"build:viewer:ci": "cross-env NODE_ENV=production PUBLIC_URL=/ APP_CONFIG=config/netlify.js QUICK_BUILD=true node --max_old_space_size=4096 ./../../node_modules/webpack/bin/webpack.js --config .webpack/webpack.pwa.js",
|
||||||
"build:viewer:demo": "cross-env NODE_ENV=production APP_CONFIG=config/demo.js HTML_TEMPLATE=rollbar.html QUICK_BUILD=true node --max_old_space_size=4096 ./../../node_modules/webpack/bin/webpack.js --progress --config .webpack/webpack.pwa.js",
|
"build:viewer:demo": "cross-env NODE_ENV=production APP_CONFIG=config/demo.js HTML_TEMPLATE=rollbar.html QUICK_BUILD=true node --max_old_space_size=4096 ./../../node_modules/webpack/bin/webpack.js --progress --config .webpack/webpack.pwa.js",
|
||||||
"dev": "cross-env NODE_ENV=development webpack-dev-server --config .webpack/webpack.pwa.js --watch",
|
"dev": "cross-env NODE_ENV=development webpack-dev-server --config .webpack/webpack.pwa.js --watch",
|
||||||
"dev:orthanc": "cross-env NODE_ENV=development PROXY_TARGET=/dicom-web PROXY_DOMAIN=http://localhost:8042 APP_CONFIG=config/docker_nginx-orthanc.js webpack-dev-server --config .webpack/webpack.pwa.js --watch",
|
"dev:orthanc": "cross-env NODE_ENV=development PROXY_TARGET=/dicom-web PROXY_DOMAIN=http://localhost:8042 APP_CONFIG=config/docker_nginx-orthanc.js webpack-dev-server --config .webpack/webpack.pwa.js --watch",
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
window.config = {
|
window.config = {
|
||||||
routerBasename: '/pwa',
|
routerBasename: '/',
|
||||||
// whiteLabelling: {},
|
// whiteLabelling: {},
|
||||||
extensions: [],
|
extensions: [],
|
||||||
modes: [],
|
modes: [],
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user