@shijiu/jsview 2.1.340-test.0 → 2.1.341-test.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/tools/jsview-common.mjs +4 -4
package/package.json
CHANGED
package/tools/jsview-common.mjs
CHANGED
|
@@ -234,11 +234,11 @@ function getOptions(framework)
|
|
|
234
234
|
return options;
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
-
function getPackageObject(modulePath)
|
|
237
|
+
function getPackageObject(modulePath, pkgName = 'package.json')
|
|
238
238
|
{
|
|
239
|
-
const pkgFullFile = path.resolve(modulePath,
|
|
239
|
+
const pkgFullFile = path.resolve(modulePath, pkgName);
|
|
240
240
|
if (!fs.existsSync(pkgFullFile)) {
|
|
241
|
-
Logger.ErrorAndExit('Failed to get ' +
|
|
241
|
+
Logger.ErrorAndExit('Failed to get ' + pkgFullFile + ', file is not exists.');
|
|
242
242
|
}
|
|
243
243
|
let pkgContent = fs.readFileSync(pkgFullFile, 'utf8');
|
|
244
244
|
const pkgObj = JSON.parse(pkgContent);
|
|
@@ -322,7 +322,7 @@ function execCommand(cmdline, withOutput)
|
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
324
|
|
|
325
|
-
function checkNodeVersion(minMajorVersion =
|
|
325
|
+
function checkNodeVersion(minMajorVersion = 18)
|
|
326
326
|
{
|
|
327
327
|
const versions = process.version.replace('v', '').split('.');
|
|
328
328
|
const [majorVersion, minorVersion, patchVersion] = versions;
|