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:
|
||||
|
||||
- Addition of workflow modes
|
||||
|
||||
- Often, medical imaging use cases involves lots of specific workflows that re-use
|
||||
functionalities. We have added the capability of workflow modes, that enable people
|
||||
to customize user interface and configure application for specific workflow.
|
||||
- The idea is to re-use the functionalities that extensions provide and create a workflow.
|
||||
Brain segmentation workflow is different from prostate segmentation in UI for sure; however, they share the segmentation tools that can be re-used.
|
||||
- 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.
|
||||
- Often, medical imaging use cases involves lots of specific workflows that
|
||||
re-use functionalities. We have added the capability of workflow modes, that
|
||||
enable people to customize user interface and configure application for
|
||||
specific workflow.
|
||||
- The idea is to re-use the functionalities that extensions provide and create
|
||||
a workflow. Brain segmentation workflow is different from prostate
|
||||
segmentation in UI for sure; however, they share the segmentation tools that
|
||||
can be re-used.
|
||||
- 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
|
||||
* tailwind CSS
|
||||
* Tailwind CSS
|
||||
* End-to-end test suite
|
||||
|
||||
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 =
|
||||
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';
|
||||
|
||||
// Special deployment for staging locales until they get enough translations
|
||||
@ -59,9 +59,9 @@ const isI18nStaging = process.env.I18N_STAGING === 'true';
|
||||
['en']
|
||||
: isI18nStaging
|
||||
? // Staging locales: https://docusaurus-i18n-staging.netlify.app/
|
||||
['en', 'ja']
|
||||
['en']
|
||||
: // Production locales
|
||||
['en', 'fr', 'ko', 'zh-CN'],
|
||||
['en'],
|
||||
},
|
||||
onBrokenLinks: 'warn',
|
||||
onBrokenMarkdownLinks: 'warn',
|
||||
@ -122,7 +122,7 @@ const isI18nStaging = process.env.I18N_STAGING === 'true';
|
||||
'queryString',
|
||||
],
|
||||
// swRegister: false,
|
||||
swCustom: path.resolve(__dirname, 'src/sw.js'),
|
||||
// swCustom: path.resolve(__dirname, 'src/sw.js'),
|
||||
pwaHead: [
|
||||
{
|
||||
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',
|
||||
],
|
||||
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",
|
||||
"build": "docz build",
|
||||
"build:ui:ci": "docz build",
|
||||
"build:ui:deploy-preview": "docz build --base=/ui/",
|
||||
"dev": "docz dev",
|
||||
"serve": "docz serve",
|
||||
"docs:preview": "yarn run dev"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
@tailwind utilities;
|
||||
|
||||
/* 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 */
|
||||
.truncate-2-lines {
|
||||
|
||||
@ -2,7 +2,7 @@ module.exports = {
|
||||
prefix: '',
|
||||
important: false,
|
||||
separator: ':',
|
||||
purge: ['./src/**/*.jsx'],
|
||||
//purge: ['./src/**/*.jsx'],
|
||||
theme: {
|
||||
screens: {
|
||||
sm: '640px',
|
||||
|
||||
@ -12,8 +12,6 @@ const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
const ExtractCssChunksPlugin = require('extract-css-chunks-webpack-plugin');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const { InjectManifest } = require('workbox-webpack-plugin');
|
||||
const TerserJSPlugin = require('terser-webpack-plugin');
|
||||
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
||||
// ~~ Rules
|
||||
const extractStyleChunksRule = require('./rules/extractStyleChunks.js');
|
||||
// ~~ Directories
|
||||
|
||||
@ -10,8 +10,10 @@
|
||||
|
||||
[build]
|
||||
base = ""
|
||||
publish = ".netlify/www/"
|
||||
command = ".netlify/build-deploy-preview.sh"
|
||||
build = "yarn run build:viewer:ci"
|
||||
publish = "dist"
|
||||
ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../ui/ ../core/ ../i18n/"
|
||||
|
||||
|
||||
# NODE_VERSION in root `.nvmrc` takes priority
|
||||
# YARN_FLAGS: https://www.netlify.com/docs/build-gotchas/#yarn
|
||||
@ -22,12 +24,7 @@
|
||||
YARN_VERSION = "1.22.0"
|
||||
RUBY_VERSION = "2.6.2"
|
||||
YARN_FLAGS = "--no-ignore-optional --pure-lockfile"
|
||||
NETLIFY_RESTORE = "1"
|
||||
|
||||
# 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
|
||||
NETLIFY_USE_YARN = "true"
|
||||
|
||||
[[headers]]
|
||||
# Define which paths this specific [[headers]] block will cover.
|
||||
@ -18,7 +18,7 @@
|
||||
"proxy": "http://localhost:8042",
|
||||
"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: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",
|
||||
"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",
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
window.config = {
|
||||
routerBasename: '/pwa',
|
||||
routerBasename: '/',
|
||||
// whiteLabelling: {},
|
||||
extensions: [],
|
||||
modes: [],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user