fix(cli): various fixes for adding custom modes and extensions (#3683)
Co-authored-by: Alireza <ar.sedghi@gmail.com>
This commit is contained in:
1 parent
52da92fed4
commit
dc73b18748
11 files changed
+61
-246
No files matched your search
@@ -4,10 +4,14 @@ import path from 'path';
|
||||
async function editPackageJson(options) {
|
||||
const { name, version, description, author, license, targetDir } = options;
|
||||
|
||||
const ohifVersion = fs.readFileSync('./version.txt', 'utf8');
|
||||
|
||||
// read package.json from targetDir
|
||||
const dependenciesPath = path.join(targetDir, 'dependencies.json');
|
||||
const rawData = fs.readFileSync(dependenciesPath, 'utf8');
|
||||
const packageJson = JSON.parse(rawData);
|
||||
|
||||
const dataWithOHIFVersion = rawData.replace(/\{LATEST_OHIF_VERSION\}/g, ohifVersion);
|
||||
const packageJson = JSON.parse(dataWithOHIFVersion);
|
||||
|
||||
// edit package.json
|
||||
const mergedObj = Object.assign(
|
||||
|
||||
Reference in new issue
Block a user