composer.json 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. {
  2. "name": "overtrue/pinyin",
  3. "description": "Chinese to pinyin translator.",
  4. "keywords": [
  5. "chinese",
  6. "pinyin",
  7. "cn2pinyin"
  8. ],
  9. "homepage": "https://github.com/overtrue/pinyin",
  10. "license": "MIT",
  11. "authors": [
  12. {
  13. "name": "overtrue",
  14. "homepage": "http://github.com/overtrue",
  15. "email": "anzhengchao@gmail.com"
  16. }
  17. ],
  18. "autoload": {
  19. "psr-4": {
  20. "Overtrue\\Pinyin\\": "src/"
  21. },
  22. "files": ["src/const.php"]
  23. },
  24. "autoload-dev": {
  25. "psr-4": {
  26. "Overtrue\\Pinyin\\Test\\": "tests/"
  27. }
  28. },
  29. "require": {
  30. "php":">=7.1"
  31. },
  32. "require-dev": {
  33. "phpunit/phpunit": "~8.0",
  34. "brainmaestro/composer-git-hooks": "^2.7",
  35. "friendsofphp/php-cs-fixer": "^2.16"
  36. },
  37. "extra": {
  38. "hooks": {
  39. "pre-commit": [
  40. "composer test",
  41. "composer fix-style"
  42. ],
  43. "pre-push": [
  44. "composer test",
  45. "composer check-style"
  46. ]
  47. }
  48. },
  49. "scripts": {
  50. "post-update-cmd": [
  51. "cghooks update"
  52. ],
  53. "post-merge": "composer install",
  54. "post-install-cmd": [
  55. "cghooks add --ignore-lock",
  56. "cghooks update"
  57. ],
  58. "cghooks": "vendor/bin/cghooks",
  59. "check-style": "php-cs-fixer fix --using-cache=no --diff --config=.php_cs --dry-run --ansi",
  60. "fix-style": "php-cs-fixer fix --using-cache=no --config=.php_cs --ansi",
  61. "test": "vendor/bin/phpunit --colors=always"
  62. },
  63. "scripts-descriptions": {
  64. "test": "Run all tests.",
  65. "check-style": "Run style checks (only dry run - no fixing!).",
  66. "fix-style": "Run style checks and fix violations."
  67. }
  68. }