mirror of
https://gitee.com/wonderful-code/buildadmin
synced 2024-11-21 22:55:36 +00:00
refactor:可以使用更低版本的NPM和NodeJs
This commit is contained in:
parent
57a3a4182b
commit
933f7101e4
@ -22,11 +22,11 @@ class Index extends Api
|
|||||||
// 需要的PHP版本
|
// 需要的PHP版本
|
||||||
static $needPHPVersion = '7.1.0';
|
static $needPHPVersion = '7.1.0';
|
||||||
// 需要的Npm版本
|
// 需要的Npm版本
|
||||||
static $needNpmVersion = '8.3.0';
|
static $needNpmVersion = '7.0.0';
|
||||||
// 需要的Cnpm版本
|
// 需要的Cnpm版本
|
||||||
static $needCnpmVersion = '7.1.0';
|
static $needCnpmVersion = '7.1.0';
|
||||||
// 需要的NodeJs版本
|
// 需要的NodeJs版本
|
||||||
static $needNodejsVersion = '16.13.0';
|
static $needNodejsVersion = '14.13.1';
|
||||||
|
|
||||||
|
|
||||||
public function __construct(App $app)
|
public function __construct(App $app)
|
||||||
@ -278,15 +278,15 @@ class Index extends Api
|
|||||||
'state' => $npmVersionCompare ? self::$ok : self::$warn,
|
'state' => $npmVersionCompare ? self::$ok : self::$warn,
|
||||||
'link' => $npmVersionLink ?? [],
|
'link' => $npmVersionLink ?? [],
|
||||||
],
|
],
|
||||||
'cnpm_version' => [
|
|
||||||
'describe' => $cnpmVersion ? $cnpmVersion : __('Acquisition failed'),
|
|
||||||
'state' => $cnpmVersionCompare ? self::$ok : self::$warn,
|
|
||||||
'link' => $cnpmVersionLink ?? []
|
|
||||||
],
|
|
||||||
'nodejs_version' => [
|
'nodejs_version' => [
|
||||||
'describe' => $nodejsVersion ? $nodejsVersion : __('Acquisition failed'),
|
'describe' => $nodejsVersion ? $nodejsVersion : __('Acquisition failed'),
|
||||||
'state' => $nodejsVersionCompare ? self::$ok : self::$warn,
|
'state' => $nodejsVersionCompare ? self::$ok : self::$warn,
|
||||||
'link' => $nodejsVersionLink ?? []
|
'link' => $nodejsVersionLink ?? []
|
||||||
|
],
|
||||||
|
'cnpm_version' => [
|
||||||
|
'describe' => $cnpmVersion ? $cnpmVersion : __('Acquisition failed'),
|
||||||
|
'state' => $cnpmVersionCompare ? self::$ok : self::$warn,
|
||||||
|
'link' => $cnpmVersionLink ?? []
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user