refactor:允许终端执行的命令移动到了单独的配置文件

This commit is contained in:
妙码生花 2022-08-26 17:05:03 +08:00
parent cbe0566941
commit 50ae4a0528

View File

@ -16,52 +16,7 @@ return [
'auto_sort_eq_weight' => false,
// 开启前台会员中心
'open_member_center' => true,
// 允许执行的命令
'allowed_commands' => [
'install-package-manager' => [
'cnpm' => 'npm install cnpm -g --registry=https://registry.npmmirror.com',
'yarn' => 'npm install -g yarn',
'pnpm' => 'npm install -g pnpm',
'ni' => 'npm install -g @antfu/ni',
],
'version-view' => [
'npm' => 'npm -v',
'cnpm' => 'cnpm -v',
'yarn' => 'yarn -v',
'pnpm' => 'pnpm -v',
'node' => 'node -v',
],
'test-install' => [
'npm' => 'cd npm-install-test && npm install',
'cnpm' => 'cd npm-install-test && cnpm install',
'yarn' => 'cd npm-install-test && yarn install',
'pnpm' => 'cd npm-install-test && pnpm install',
'ni' => 'cd npm-install-test && ni install',
],
'web-install' => [
'npm' => 'cd ../web && npm install',
'cnpm' => 'cd ../web && cnpm install',
'yarn' => 'cd ../web && yarn install',
'pnpm' => 'cd ../web && pnpm install',
'ni' => 'cd ../web && ni install',
],
'web-build' => [
'npm' => 'cd ../web && npm run build',
'cnpm' => 'cd ../web && cnpm run build',
'yarn' => 'cd ../web && yarn run build',
'pnpm' => 'cd ../web && pnpm run build',
'ni' => 'cd ../web && nr build',
],
'set-registry' => [
'npm' => 'npm config set registry https://registry.npmjs.org/ && npm config get registry',
'taobao' => 'npm config set registry https://registry.npm.taobao.org/ && npm config get registry',
'rednpm' => 'npm config set registry http://registry.mirror.cqupt.edu.cn/ && npm config get registry'
],
'composer' => [
'update' => 'cd ../ && composer update',
],
'ping-baidu' => 'ping baidu.com',
],
// Token 配置
'token' => [
// 默认驱动方式
'default' => 'mysql',