turbo.json 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. {
  2. "$schema": "https://turbo.build/schema.json",
  3. "globalEnv": ["NODE_ENV"],
  4. "globalPassThroughEnv": ["COREPACK_HOME"],
  5. "ui": "tui",
  6. "tasks": {
  7. "//#fix": {
  8. "dependsOn": ["//#fix:lint", "//#fix:format"],
  9. "cache": false
  10. },
  11. "//#fix:format": {
  12. "dependsOn": ["//#install:modules", "//#fix:lint"],
  13. "cache": false
  14. },
  15. "//#fix:lint": {
  16. "dependsOn": ["//#install:modules", "^build"],
  17. "cache": false
  18. },
  19. "//#install:modules": {
  20. "inputs": [
  21. "**/package.json",
  22. ".npmrc",
  23. ".npmignore",
  24. "pnpm-workspace.yaml",
  25. "!**/.next/**",
  26. "!**/dist/**"
  27. ],
  28. "outputs": ["pnpm-lock.yaml"]
  29. },
  30. "//#test": {
  31. "dependsOn": [
  32. "//#test:types",
  33. "//#test:unit",
  34. "//#test:integration",
  35. "//#test:format",
  36. "//#test:lint"
  37. ]
  38. },
  39. "//#test:format": {
  40. "dependsOn": ["//#install:modules"]
  41. },
  42. "//#test:lint": {
  43. "dependsOn": ["//#install:modules", "^build"]
  44. },
  45. "//#test:types": {
  46. "dependsOn": ["//#install:modules", "^build"]
  47. },
  48. "//#test:unit": {
  49. "dependsOn": ["//#install:modules", "^build"]
  50. },
  51. "//#test:integration": {
  52. "dependsOn": ["//#install:modules", "^build"]
  53. },
  54. "build": {
  55. "dependsOn": [
  56. "//#install:modules",
  57. "pull:env",
  58. "^build",
  59. "build:cjs",
  60. "build:esm"
  61. ],
  62. "inputs": [
  63. "$TURBO_DEFAULT$",
  64. "!README.md",
  65. "!**/*.test.*",
  66. "!jest.config.js",
  67. "!eslint.config.js",
  68. "!prettier.config.js",
  69. "!vercel.json"
  70. ],
  71. "outputs": ["lib/**", "dist/**", ".next/**", "!.next/cache/**"]
  72. },
  73. "build:cjs": {
  74. "dependsOn": ["//#install:modules"],
  75. "inputs": [
  76. "$TURBO_DEFAULT$",
  77. "!README.md",
  78. "!**/*.test.*",
  79. "!jest.config.js",
  80. "!eslint.config.js",
  81. "!prettier.config.js",
  82. "!vercel.json"
  83. ],
  84. "outputs": ["dist/cjs/**"]
  85. },
  86. "build:esm": {
  87. "dependsOn": ["//#install:modules"],
  88. "inputs": [
  89. "$TURBO_DEFAULT$",
  90. "!README.md",
  91. "!**/*.test.*",
  92. "!jest.config.js",
  93. "!eslint.config.js",
  94. "!prettier.config.js",
  95. "!vercel.json"
  96. ],
  97. "outputs": ["dist/esm/**"]
  98. },
  99. "fix": {
  100. "dependsOn": ["fix:lint", "fix:format"],
  101. "cache": false
  102. },
  103. "fix:format": {
  104. "dependsOn": ["//#install:modules", "fix:lint"],
  105. "cache": false
  106. },
  107. "fix:lint": {
  108. "dependsOn": ["//#install:modules", "^build"],
  109. "cache": false
  110. },
  111. "pull:env": {
  112. "dependsOn": ["//#install:modules"],
  113. "outputs": [".env.local"],
  114. "cache": false
  115. },
  116. "start:dev": {
  117. "dependsOn": ["//#install:modules", "pull:env"],
  118. "persistent": true,
  119. "cache": false
  120. },
  121. "start:prod": {
  122. "dependsOn": ["//#install:modules", "build"],
  123. "persistent": true,
  124. "cache": false
  125. },
  126. "test": {
  127. "dependsOn": [
  128. "test:types",
  129. "test:unit",
  130. "test:integration",
  131. "test:format",
  132. "test:lint"
  133. ]
  134. },
  135. "test:format": {
  136. "dependsOn": ["//#install:modules"]
  137. },
  138. "test:lint": {
  139. "dependsOn": ["//#install:modules", "^build"]
  140. },
  141. "test:types": {
  142. "dependsOn": ["//#install:modules", "^build"]
  143. },
  144. "test:unit": {
  145. "dependsOn": ["//#install:modules", "^build"]
  146. },
  147. "test:integration": {
  148. "dependsOn": ["//#install:modules", "^build"]
  149. }
  150. }
  151. }