From 1b30ff83a5cf5172018aeb42c65dc56d0b999b76 Mon Sep 17 00:00:00 2001 From: Bill Wallace Date: Thu, 8 Sep 2022 22:22:51 -0400 Subject: [PATCH] fix: ohif cli bug for linking (#2892) * fix(cli):Make the linkage in the root node modules * fix(cli):Fix the index.tsx referencce --- platform/cli/src/commands/linkPackage.js | 5 ++++- platform/cli/templates/extension/dependencies.json | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/platform/cli/src/commands/linkPackage.js b/platform/cli/src/commands/linkPackage.js index 34a3b553a..96478b2e8 100644 --- a/platform/cli/src/commands/linkPackage.js +++ b/platform/cli/src/commands/linkPackage.js @@ -36,10 +36,13 @@ async function linkPackage(packageDir, options, addToConfig, keyword) { results = await execa(`yarn`, ['link']); // change directory to OHIF Platform root and execute yarn link - process.chdir(viewerDirectory); + process.chdir(`${viewerDirectory}/../..`); results = await execa(`yarn`, ['link', packageName]); console.log(results.stdout); + + // change directory to viewer packages and add the config item + process.chdir(viewerDirectory); addToConfig(packageName, { version }); } diff --git a/platform/cli/templates/extension/dependencies.json b/platform/cli/templates/extension/dependencies.json index 02970822d..8b6e193ec 100644 --- a/platform/cli/templates/extension/dependencies.json +++ b/platform/cli/templates/extension/dependencies.json @@ -42,6 +42,7 @@ "babel-plugin-inline-react-svg": "^2.0.1", "@babel/preset-env": "^7.5.0", "@babel/preset-react": "^7.0.0", + "@babel/preset-typescript": "^7.18.6", "babel-eslint": "^8.0.3", "babel-loader": "^8.0.0-beta.4", "clean-webpack-plugin": "^4.0.0",