diff --git a/README.md b/README.md index f17031399..523d82834 100644 --- a/README.md +++ b/README.md @@ -118,19 +118,16 @@ This is typically where the latest development happens. Code that is in the mast Each package is tagged with beta version numbers, and published to npm such as `@ohif/ui@3.6.0-beta.1` -### `release` branch - The latest stable release +### `release/*` branches - The latest stable releases +Once the `master` branch code reaches a stable, release-ready state, we conduct a comprehensive code review and QA testing. Upon approval, we create a new release branch from `master`. These branches represent the latest stable version considered ready for production. -This branch represents the latest stable version of the project that is considered ready for production. The code in this branch should be fully tested and vetted for release. Once the code in the master branch reaches a state where it's stable and ready to be released to users, -we do a comprehensive code review and QA testing. Once the code is approved, -we merge it into the release branch and tag a new release. +For example, `release/3.5` is the branch for version 3.5.0, and `release/3.6` is for version 3.6.0. After each release, we wait a few days to ensure no critical bugs. If any are found, we fix them in the release branch and create a new release with a minor version bump, e.g., 3.5.1 in the `release/3.5` branch. -Each package is tagged with version numbers, and published to npm such as `@ohif/ui@3.5.0` - -Note: `master` is always ahead of `release` branch. We publish both docker builds for beta and stable releases. +Each package is tagged with version numbers and published to npm, such as `@ohif/ui@3.5.0`. Note that `master` is always ahead of the `release` branch. We publish docker builds for both beta and stable releases. Here is a schematic representation of our development workflow: -![Alt text](platform/docs/docs/assets/img/github-readme-branches.png) +![alt text](platform/docs/docs/assets/img/github-readme-branches-Jun2024.png) diff --git a/extensions/dicom-pdf/.webpack/webpack.prod.js b/extensions/dicom-pdf/.webpack/webpack.prod.js index eb47972e1..7957a5153 100644 --- a/extensions/dicom-pdf/.webpack/webpack.prod.js +++ b/extensions/dicom-pdf/.webpack/webpack.prod.js @@ -3,6 +3,8 @@ const { merge } = require('webpack-merge'); const path = require('path'); const webpackCommon = require('./../../../.webpack/webpack.base.js'); const pkg = require('./../package.json'); +const MiniCssExtractPlugin = require('mini-css-extract-plugin'); + const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; const ROOT_DIR = path.join(__dirname, './..'); @@ -12,6 +14,8 @@ const ENTRY = { app: `${SRC_DIR}/index.tsx`, }; +const outputName = `ohif-${pkg.name.split('/').pop()}`; + module.exports = (env, argv) => { const commonConfig = webpackCommon(env, argv, { SRC_DIR, ENTRY, DIST_DIR }); @@ -42,6 +46,10 @@ module.exports = (env, argv) => { new webpack.optimize.LimitChunkCountPlugin({ maxChunks: 1, }), + new MiniCssExtractPlugin({ + filename: `./dist/${outputName}.css`, + chunkFilename: `./dist/${outputName}.css`, + }), // new BundleAnalyzerPlugin(), ], }); diff --git a/platform/cli/src/commands/utils/editPackageJson.js b/platform/cli/src/commands/utils/editPackageJson.js index 4caa75074..e29da6a60 100644 --- a/platform/cli/src/commands/utils/editPackageJson.js +++ b/platform/cli/src/commands/utils/editPackageJson.js @@ -4,7 +4,7 @@ import path from 'path'; async function editPackageJson(options) { const { name, version, description, author, license, targetDir } = options; - const ohifVersion = fs.readFileSync('./version.txt', 'utf8'); + const ohifVersion = fs.readFileSync('./version.txt', 'utf8').trim(); // read package.json from targetDir const dependenciesPath = path.join(targetDir, 'dependencies.json'); diff --git a/platform/cli/templates/extension/dependencies.json b/platform/cli/templates/extension/dependencies.json index 943bf89c8..fb5909b59 100644 --- a/platform/cli/templates/extension/dependencies.json +++ b/platform/cli/templates/extension/dependencies.json @@ -15,9 +15,9 @@ "start": "yarn run dev" }, "peerDependencies": { - "@ohif/core": "^3.0.0", - "@ohif/extension-default": "^3.0.0", - "@ohif/extension-cornerstone": "^3.0.0", + "@ohif/core": "^{LATEST_OHIF_VERSION}", + "@ohif/extension-default": "^{LATEST_OHIF_VERSION}", + "@ohif/extension-cornerstone": "^{LATEST_OHIF_VERSION}", "@ohif/i18n": "^1.0.0", "prop-types": "^15.6.2", "react": "^18.3.1", diff --git a/platform/docs/docs/assets/img/github-readme-branches-Jun2024.png b/platform/docs/docs/assets/img/github-readme-branches-Jun2024.png new file mode 100644 index 000000000..4129cc43b Binary files /dev/null and b/platform/docs/docs/assets/img/github-readme-branches-Jun2024.png differ diff --git a/platform/docs/docs/assets/img/github-readme-branches.png b/platform/docs/docs/assets/img/github-readme-branches.png deleted file mode 100644 index 271001a47..000000000 Binary files a/platform/docs/docs/assets/img/github-readme-branches.png and /dev/null differ diff --git a/platform/docs/docs/development/getting-started.md b/platform/docs/docs/development/getting-started.md index cafb0f538..32214b66f 100644 --- a/platform/docs/docs/development/getting-started.md +++ b/platform/docs/docs/development/getting-started.md @@ -40,6 +40,7 @@ aren't as concerned with syncing updates, then follow these steps: ## Developing + ### Branches #### `master` branch - The latest dev (beta) release @@ -50,19 +51,17 @@ This is typically where the latest development happens. Code that is in the mast Each package is tagged with beta version numbers, and published to npm such as `@ohif/ui@3.6.0-beta.1` -### `release` branch - The latest stable release +### `release/*` branches - The latest stable releases +Once the `master` branch code reaches a stable, release-ready state, we conduct a comprehensive code review and QA testing. Upon approval, we create a new release branch from `master`. These branches represent the latest stable version considered ready for production. -This branch represents the latest stable version of the project that is considered ready for production. The code in this branch should be fully tested and vetted for release. Once the code in the master branch reaches a state where it's stable and ready to be released to users, -we do a comprehensive code review and QA testing. Once the code is approved, -we merge it into the release branch and tag a new release. +For example, `release/3.5` is the branch for version 3.5.0, and `release/3.6` is for version 3.6.0. After each release, we wait a few days to ensure no critical bugs. If any are found, we fix them in the release branch and create a new release with a minor version bump, e.g., 3.5.1 in the `release/3.5` branch. -Each package is tagged with version numbers, and published to npm such as `@ohif/ui@3.5.0` - -Note: `master` is always ahead of `release` branch. We publish both docker builds for beta and stable releases. +Each package is tagged with version numbers and published to npm, such as `@ohif/ui@3.5.0`. Note that `master` is always ahead of the `release` branch. We publish docker builds for both beta and stable releases. Here is a schematic representation of our development workflow: -![Alt text](../../docs/assets/img/github-readme-branches.png) +![alt text](../assets/img/github-readme-branches-Jun2024.png) + ### Requirements