terminal.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | Trace设置 开启调试模式后有效
  4. // +----------------------------------------------------------------------
  5. return [
  6. // 命令行
  7. 'commands' => [
  8. // 查看版本的命令
  9. 'version' => [
  10. 'npm' => 'npm -v',
  11. 'node' => 'node -v',
  12. ],
  13. 'npm-admin' => [
  14. 'cwd' => 'admin',
  15. 'command' => 'npm install',
  16. ],
  17. 'npm-web' => [
  18. 'cwd' => 'web',
  19. 'command' => 'npm install',
  20. ],
  21. 'npm-uni-app' => [
  22. 'cwd' => 'uni-app',
  23. 'command' => 'npm install',
  24. ],
  25. 'composer-install' => [
  26. 'cwd' => 'niucloud',
  27. 'command' => 'composer update',
  28. ],
  29. // 切换到国内镜像
  30. 'set-mirror' => [
  31. //切换到淘宝镜像
  32. 'npm' => 'npm config set registry https://registry.npmjs.org',
  33. //切换到阿里云镜像
  34. 'composer' => 'composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/',
  35. ],
  36. ],
  37. ];