@icebreakers/monorepo-templates 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. package/README.md +9 -0
  2. package/assets/.changeset/config.json +16 -0
  3. package/assets/.changeset/create-icebreaker-interactive.md +5 -0
  4. package/assets/.changeset/monorepo-templates-package.md +5 -0
  5. package/assets/.changeset/skills-sync-resources.md +5 -0
  6. package/assets/.dockerignore +44 -0
  7. package/assets/.editorconfig +12 -0
  8. package/assets/.gitattributes +218 -0
  9. package/assets/.github/FUNDING.yml +4 -0
  10. package/assets/.github/ISSUE_TEMPLATE/bug_report.yml +71 -0
  11. package/assets/.github/ISSUE_TEMPLATE/config.yml +17 -0
  12. package/assets/.github/workflows/ci.yml +62 -0
  13. package/assets/.github/workflows/release.yml +57 -0
  14. package/assets/.husky/commit-msg +4 -0
  15. package/assets/.husky/pre-commit +4 -0
  16. package/assets/.vscode/extensions.json +6 -0
  17. package/assets/.vscode/settings.json +172 -0
  18. package/assets/CODE_OF_CONDUCT.md +128 -0
  19. package/assets/CONTRIBUTING.md +3 -0
  20. package/assets/Dockerfile +27 -0
  21. package/assets/LICENSE +21 -0
  22. package/assets/SECURITY.md +21 -0
  23. package/assets/commitlint.config.ts +3 -0
  24. package/assets/eslint.config.js +7 -0
  25. package/assets/gitignore +38 -0
  26. package/assets/lint-staged.config.js +11 -0
  27. package/assets/monorepo.config.ts +22 -0
  28. package/assets/netlify.toml +14 -0
  29. package/assets/package.json +88 -0
  30. package/assets/pnpm-workspace.yaml +11 -0
  31. package/assets/renovate.json +28 -0
  32. package/assets/stylelint.config.js +3 -0
  33. package/assets/tsconfig.json +51 -0
  34. package/assets/turbo.json +74 -0
  35. package/assets/vitest.config.ts +123 -0
  36. package/assets-data.mjs +45 -0
  37. package/dist/index.d.mts +37 -0
  38. package/dist/index.mjs +287 -0
  39. package/package.json +51 -0
  40. package/skeleton/.editorconfig +12 -0
  41. package/skeleton/LICENSE +21 -0
  42. package/skeleton/commitlint.config.ts +3 -0
  43. package/skeleton/eslint.config.js +7 -0
  44. package/skeleton/gitignore +38 -0
  45. package/skeleton/lint-staged.config.js +11 -0
  46. package/skeleton/package.json +88 -0
  47. package/skeleton/pnpm-workspace.yaml +11 -0
  48. package/skeleton/renovate.json +28 -0
  49. package/skeleton/stylelint.config.js +3 -0
  50. package/skeleton/tsconfig.json +51 -0
  51. package/skeleton/turbo.json +74 -0
  52. package/skeleton/vitest.config.ts +123 -0
  53. package/template-data.mjs +10 -0
  54. package/templates/cli/bin/index.js +2 -0
  55. package/templates/cli/dev/index.ts +2 -0
  56. package/templates/cli/gitignore +2 -0
  57. package/templates/cli/package.json +35 -0
  58. package/templates/cli/src/cli.ts +4 -0
  59. package/templates/cli/src/index.ts +15 -0
  60. package/templates/cli/tsconfig.json +7 -0
  61. package/templates/cli/tsup.config.ts +13 -0
  62. package/templates/client/eslint.config.js +12 -0
  63. package/templates/client/gitignore +28 -0
  64. package/templates/client/index.html +13 -0
  65. package/templates/client/package.json +52 -0
  66. package/templates/client/public/vite.svg +1 -0
  67. package/templates/client/src/App.vue +11 -0
  68. package/templates/client/src/main.ts +16 -0
  69. package/templates/client/src/pages/index.vue +357 -0
  70. package/templates/client/src/query-keys.ts +4 -0
  71. package/templates/client/src/router/index.ts +13 -0
  72. package/templates/client/src/stores/i18n.ts +24 -0
  73. package/templates/client/src/stores/index.ts +15 -0
  74. package/templates/client/src/style.css +1 -0
  75. package/templates/client/src/trpc/index.ts +10 -0
  76. package/templates/client/src/vite-env.d.ts +2 -0
  77. package/templates/client/tsconfig.app.json +28 -0
  78. package/templates/client/tsconfig.json +8 -0
  79. package/templates/client/tsconfig.node.json +25 -0
  80. package/templates/client/tsconfig.worker.json +11 -0
  81. package/templates/client/vite.config.ts +57 -0
  82. package/templates/client/worker/app.ts +24 -0
  83. package/templates/client/worker/config.ts +1 -0
  84. package/templates/client/worker/fetch-entry.ts +5 -0
  85. package/templates/client/worker/node-entry.ts +13 -0
  86. package/templates/client/worker/trpc-router.ts +24 -0
  87. package/templates/client/wrangler.jsonc +24 -0
  88. package/templates/server/gitignore +2 -0
  89. package/templates/server/package.json +60 -0
  90. package/templates/server/src/app.ts +191 -0
  91. package/templates/server/src/config.ts +1 -0
  92. package/templates/server/src/fetch-entry.ts +5 -0
  93. package/templates/server/src/node-entry.ts +13 -0
  94. package/templates/server/test/index.test.ts +14 -0
  95. package/templates/server/tsconfig.json +24 -0
  96. package/templates/server/tsup.config.ts +13 -0
  97. package/templates/server/vitest.config.ts +15 -0
  98. package/templates/server/wrangler.jsonc +18 -0
  99. package/templates/tsdown/package.json +47 -0
  100. package/templates/tsdown/src/index.ts +5 -0
  101. package/templates/tsdown/test/index.test.ts +11 -0
  102. package/templates/tsdown/tsconfig.json +15 -0
  103. package/templates/tsdown/tsdown.config.ts +9 -0
  104. package/templates/tsdown/vitest.config.ts +15 -0
  105. package/templates/tsup/build.config.ts +24 -0
  106. package/templates/tsup/package.json +48 -0
  107. package/templates/tsup/src/index.ts +12 -0
  108. package/templates/tsup/test/index.test.ts +18 -0
  109. package/templates/tsup/tsconfig.json +15 -0
  110. package/templates/tsup/tsup.config.ts +18 -0
  111. package/templates/tsup/vitest.config.ts +15 -0
  112. package/templates/unbuild/build.config.ts +24 -0
  113. package/templates/unbuild/package.json +48 -0
  114. package/templates/unbuild/src/index.ts +9 -0
  115. package/templates/unbuild/src/utils.ts +3 -0
  116. package/templates/unbuild/test/index.test.ts +18 -0
  117. package/templates/unbuild/tsconfig.json +15 -0
  118. package/templates/unbuild/vitest.config.ts +15 -0
  119. package/templates/vitepress/.vitepress/config.ts +93 -0
  120. package/templates/vitepress/.vitepress/theme/index.ts +4 -0
  121. package/templates/vitepress/.vitepress/theme/tailwind.css +1 -0
  122. package/templates/vitepress/gitignore +1 -0
  123. package/templates/vitepress/index.md +127 -0
  124. package/templates/vitepress/monorepo/index.md +46 -0
  125. package/templates/vitepress/monorepo/manage.md +129 -0
  126. package/templates/vitepress/monorepo/publish.md +142 -0
  127. package/templates/vitepress/package.json +39 -0
  128. package/templates/vitepress/public/logo.jpg +0 -0
  129. package/templates/vitepress/thinking.md +88 -0
  130. package/templates/vitepress/tools/changeset.md +87 -0
  131. package/templates/vitepress/tools/husky.md +108 -0
  132. package/templates/vitepress/tools/lint-staged.md +79 -0
  133. package/templates/vitepress/tools/pnpm.md +101 -0
  134. package/templates/vitepress/tools/renovate.md +91 -0
  135. package/templates/vitepress/tools/turborepo.md +149 -0
  136. package/templates/vitepress/why/assets/npm-dt.svg +15 -0
  137. package/templates/vitepress/why/assets/npm-ts.svg +19 -0
  138. package/templates/vitepress/why/examples/0.npm-basic-package/index.js +10 -0
  139. package/templates/vitepress/why/examples/0.npm-basic-package/package.json +11 -0
  140. package/templates/vitepress/why/examples/1.npm-basic-package/index.cjs +12 -0
  141. package/templates/vitepress/why/examples/1.npm-basic-package/index.d.ts +1 -0
  142. package/templates/vitepress/why/examples/1.npm-basic-package/index.js +8 -0
  143. package/templates/vitepress/why/examples/1.npm-basic-package/package.json +19 -0
  144. package/templates/vitepress/why/examples/2.npm-basic-package/README.md +1 -0
  145. package/templates/vitepress/why/examples/2.npm-basic-package/package-lock.json +30 -0
  146. package/templates/vitepress/why/examples/2.npm-basic-package/package.json +35 -0
  147. package/templates/vitepress/why/examples/2.npm-basic-package/rename-ext.js +24 -0
  148. package/templates/vitepress/why/examples/2.npm-basic-package/src/index.ts +8 -0
  149. package/templates/vitepress/why/examples/2.npm-basic-package/tsconfig.cjs.json +8 -0
  150. package/templates/vitepress/why/examples/2.npm-basic-package/tsconfig.esm.json +7 -0
  151. package/templates/vitepress/why/examples/2.npm-basic-package/tsconfig.json +18 -0
  152. package/templates/vitepress/why/examples/3.npm-basic-package/README.md +1 -0
  153. package/templates/vitepress/why/examples/3.npm-basic-package/build.config.ts +24 -0
  154. package/templates/vitepress/why/examples/3.npm-basic-package/package-lock.json +3661 -0
  155. package/templates/vitepress/why/examples/3.npm-basic-package/package.json +32 -0
  156. package/templates/vitepress/why/examples/3.npm-basic-package/src/index.ts +8 -0
  157. package/templates/vitepress/why/examples/3.npm-basic-package/tsconfig.json +16 -0
  158. package/templates/vitepress/why/examples/3.npm-basic-package/tsup.config.ts +16 -0
  159. package/templates/vitepress/why/examples/usage-cjs/cjs.cjs +4 -0
  160. package/templates/vitepress/why/examples/usage-cjs/esm.mjs +4 -0
  161. package/templates/vitepress/why/examples/usage-cjs/index.js +12 -0
  162. package/templates/vitepress/why/examples/usage-cjs/package-lock.json +42 -0
  163. package/templates/vitepress/why/examples/usage-cjs/package.json +20 -0
  164. package/templates/vitepress/why/examples/usage-esm/cjs.cjs +4 -0
  165. package/templates/vitepress/why/examples/usage-esm/createRequire.js +7 -0
  166. package/templates/vitepress/why/examples/usage-esm/esm.mjs +4 -0
  167. package/templates/vitepress/why/examples/usage-esm/index.js +8 -0
  168. package/templates/vitepress/why/examples/usage-esm/package-lock.json +42 -0
  169. package/templates/vitepress/why/examples/usage-esm/package.json +21 -0
  170. package/templates/vitepress/why/how-to-reuse-js-code.md +250 -0
  171. package/templates/vitepress/why/index.md +1 -0
  172. package/templates/vitepress/why/js-cjs-mjs.md +99 -0
  173. package/templates/vitepress/why/js-keywords.md +132 -0
  174. package/templates/vitepress/why/modern/bundlers.md +79 -0
  175. package/templates/vitepress/why/modern/dts.md +93 -0
  176. package/templates/vitepress/why/modern/esm-vs-cjs.md +84 -0
  177. package/templates/vitepress/why/modern/index.md +55 -0
  178. package/templates/vitepress/why/modern/package-entry-points.md +128 -0
  179. package/templates/vitepress/why/modern/typescript.md +155 -0
  180. package/templates/vitepress/why/publish-basic-npm-package.md +146 -0
  181. package/templates/vitepress/why/what-is-npm-package.md +162 -0
  182. package/templates/vue-lib/eslint.config.js +12 -0
  183. package/templates/vue-lib/gitignore +1 -0
  184. package/templates/vue-lib/index.html +13 -0
  185. package/templates/vue-lib/lib/HelloWorld.vue +21 -0
  186. package/templates/vue-lib/lib/index.ts +3 -0
  187. package/templates/vue-lib/package.json +61 -0
  188. package/templates/vue-lib/src/App.vue +9 -0
  189. package/templates/vue-lib/src/main.ts +8 -0
  190. package/templates/vue-lib/src/pages/index.vue +7 -0
  191. package/templates/vue-lib/src/router/index.ts +11 -0
  192. package/templates/vue-lib/src/style.css +1 -0
  193. package/templates/vue-lib/src/vite-env.d.ts +2 -0
  194. package/templates/vue-lib/test/index.test.ts +13 -0
  195. package/templates/vue-lib/tsconfig.app.json +30 -0
  196. package/templates/vue-lib/tsconfig.json +14 -0
  197. package/templates/vue-lib/tsconfig.node.json +25 -0
  198. package/templates/vue-lib/tsconfig.test.json +40 -0
  199. package/templates/vue-lib/vite.config.ts +54 -0
  200. package/templates/vue-lib/vite.shared.config.ts +13 -0
  201. package/templates/vue-lib/vitest.config.ts +13 -0
@@ -0,0 +1,172 @@
1
+ {
2
+ // Disable the default formatter, use eslint instead
3
+ "prettier.enable": false,
4
+ "editor.formatOnSave": false,
5
+ // Auto fix
6
+ "editor.codeActionsOnSave": {
7
+ "source.fixAll.eslint": "explicit",
8
+ "source.organizeImports": "never"
9
+ },
10
+ "eslint.options": {
11
+ "flags": ["v10_config_lookup_from_file"]
12
+ },
13
+ // Silent the stylistic rules in you IDE, but still auto fix them
14
+ "eslint.rules.customizations": [
15
+ // close "style/* off"
16
+ // {
17
+ // "rule": "style/*",
18
+ // "severity": "off"
19
+ // },
20
+ {
21
+ "rule": "format/*",
22
+ "severity": "off"
23
+ },
24
+ {
25
+ "rule": "*-indent",
26
+ "severity": "off"
27
+ },
28
+ {
29
+ "rule": "*-spacing",
30
+ "severity": "off"
31
+ },
32
+ {
33
+ "rule": "*-spaces",
34
+ "severity": "off"
35
+ },
36
+ {
37
+ "rule": "*-order",
38
+ "severity": "off"
39
+ },
40
+ {
41
+ "rule": "*-dangle",
42
+ "severity": "off"
43
+ },
44
+ {
45
+ "rule": "*-newline",
46
+ "severity": "off"
47
+ },
48
+ {
49
+ "rule": "*quotes",
50
+ "severity": "off"
51
+ },
52
+ {
53
+ "rule": "*semi",
54
+ "severity": "off"
55
+ }
56
+ ],
57
+ // Enable eslint for all supported languages
58
+ "eslint.validate": [
59
+ "javascript",
60
+ "javascriptreact",
61
+ "typescript",
62
+ "typescriptreact",
63
+ "vue",
64
+ "html",
65
+ "markdown",
66
+ "json",
67
+ "jsonc",
68
+ "yaml",
69
+ "toml",
70
+ "xml",
71
+ "gql",
72
+ "graphql",
73
+ "astro",
74
+ "css",
75
+ "less",
76
+ "scss",
77
+ "pcss",
78
+ "postcss"
79
+ ],
80
+ "css.validate": false,
81
+ "less.validate": false,
82
+ "scss.validate": false,
83
+ "stylelint.validate": [
84
+ "vue",
85
+ "css",
86
+ "scss"
87
+ ],
88
+ "terminal.integrated.env.linux": {
89
+ "COREPACK_NPM_REGISTRY": "https://registry.npmmirror.com",
90
+ "EDGEDRIVER_CDNURL": "https://npmmirror.com/mirrors/edgedriver",
91
+ "NODEJS_ORG_MIRROR": "https://cdn.npmmirror.com/binaries/node",
92
+ "NVM_NODEJS_ORG_MIRROR": "https://cdn.npmmirror.com/binaries/node",
93
+ "PHANTOMJS_CDNURL": "https://cdn.npmmirror.com/binaries/phantomjs",
94
+ "CHROMEDRIVER_CDNURL": "https://cdn.npmmirror.com/binaries/chromedriver",
95
+ "OPERADRIVER_CDNURL": "https://cdn.npmmirror.com/binaries/operadriver",
96
+ "CYPRESS_DOWNLOAD_PATH_TEMPLATE": "https://cdn.npmmirror.com/binaries/cypress/${version}/${platform}-${arch}/cypress.zip",
97
+ "ELECTRON_MIRROR": "https://cdn.npmmirror.com/binaries/electron/",
98
+ "ELECTRON_BUILDER_BINARIES_MIRROR": "https://cdn.npmmirror.com/binaries/electron-builder-binaries/",
99
+ "SASS_BINARY_SITE": "https://cdn.npmmirror.com/binaries/node-sass",
100
+ "SWC_BINARY_SITE": "https://cdn.npmmirror.com/binaries/node-swc",
101
+ "NWJS_URLBASE": "https://cdn.npmmirror.com/binaries/nwjs/v",
102
+ "PUPPETEER_DOWNLOAD_HOST": "https://cdn.npmmirror.com/binaries/chrome-for-testing",
103
+ "PUPPETEER_DOWNLOAD_BASE_URL": "https://cdn.npmmirror.com/binaries/chrome-for-testing",
104
+ "PLAYWRIGHT_DOWNLOAD_HOST": "https://cdn.npmmirror.com/binaries/playwright",
105
+ "SENTRYCLI_CDNURL": "https://cdn.npmmirror.com/binaries/sentry-cli",
106
+ "SAUCECTL_INSTALL_BINARY_MIRROR": "https://cdn.npmmirror.com/binaries/saucectl",
107
+ "RE2_DOWNLOAD_MIRROR": "https://cdn.npmmirror.com/binaries/node-re2",
108
+ "RE2_DOWNLOAD_SKIP_PATH": "true",
109
+ "PRISMA_ENGINES_MIRROR": "https://cdn.npmmirror.com/binaries/prisma",
110
+ "npm_config_better_sqlite3_binary_host": "https://cdn.npmmirror.com/binaries/better-sqlite3",
111
+ "npm_config_keytar_binary_host": "https://cdn.npmmirror.com/binaries/keytar",
112
+ "npm_config_sharp_binary_host": "https://cdn.npmmirror.com/binaries/sharp",
113
+ "npm_config_sharp_libvips_binary_host": "https://cdn.npmmirror.com/binaries/sharp-libvips",
114
+ "npm_config_robotjs_binary_host": "https://cdn.npmmirror.com/binaries/robotjs"
115
+ },
116
+ "terminal.integrated.env.windows": {
117
+ "COREPACK_NPM_REGISTRY": "https://registry.npmmirror.com",
118
+ "EDGEDRIVER_CDNURL": "https://npmmirror.com/mirrors/edgedriver",
119
+ "NODEJS_ORG_MIRROR": "https://cdn.npmmirror.com/binaries/node",
120
+ "NVM_NODEJS_ORG_MIRROR": "https://cdn.npmmirror.com/binaries/node",
121
+ "PHANTOMJS_CDNURL": "https://cdn.npmmirror.com/binaries/phantomjs",
122
+ "CHROMEDRIVER_CDNURL": "https://cdn.npmmirror.com/binaries/chromedriver",
123
+ "OPERADRIVER_CDNURL": "https://cdn.npmmirror.com/binaries/operadriver",
124
+ "CYPRESS_DOWNLOAD_PATH_TEMPLATE": "https://cdn.npmmirror.com/binaries/cypress/${version}/${platform}-${arch}/cypress.zip",
125
+ "ELECTRON_MIRROR": "https://cdn.npmmirror.com/binaries/electron/",
126
+ "ELECTRON_BUILDER_BINARIES_MIRROR": "https://cdn.npmmirror.com/binaries/electron-builder-binaries/",
127
+ "SASS_BINARY_SITE": "https://cdn.npmmirror.com/binaries/node-sass",
128
+ "SWC_BINARY_SITE": "https://cdn.npmmirror.com/binaries/node-swc",
129
+ "NWJS_URLBASE": "https://cdn.npmmirror.com/binaries/nwjs/v",
130
+ "PUPPETEER_DOWNLOAD_HOST": "https://cdn.npmmirror.com/binaries/chrome-for-testing",
131
+ "PUPPETEER_DOWNLOAD_BASE_URL": "https://cdn.npmmirror.com/binaries/chrome-for-testing",
132
+ "PLAYWRIGHT_DOWNLOAD_HOST": "https://cdn.npmmirror.com/binaries/playwright",
133
+ "SENTRYCLI_CDNURL": "https://cdn.npmmirror.com/binaries/sentry-cli",
134
+ "SAUCECTL_INSTALL_BINARY_MIRROR": "https://cdn.npmmirror.com/binaries/saucectl",
135
+ "RE2_DOWNLOAD_MIRROR": "https://cdn.npmmirror.com/binaries/node-re2",
136
+ "RE2_DOWNLOAD_SKIP_PATH": "true",
137
+ "PRISMA_ENGINES_MIRROR": "https://cdn.npmmirror.com/binaries/prisma",
138
+ "npm_config_better_sqlite3_binary_host": "https://cdn.npmmirror.com/binaries/better-sqlite3",
139
+ "npm_config_keytar_binary_host": "https://cdn.npmmirror.com/binaries/keytar",
140
+ "npm_config_sharp_binary_host": "https://cdn.npmmirror.com/binaries/sharp",
141
+ "npm_config_sharp_libvips_binary_host": "https://cdn.npmmirror.com/binaries/sharp-libvips",
142
+ "npm_config_robotjs_binary_host": "https://cdn.npmmirror.com/binaries/robotjs"
143
+ },
144
+ "terminal.integrated.env.osx": {
145
+ "COREPACK_NPM_REGISTRY": "https://registry.npmmirror.com",
146
+ "EDGEDRIVER_CDNURL": "https://npmmirror.com/mirrors/edgedriver",
147
+ "NODEJS_ORG_MIRROR": "https://cdn.npmmirror.com/binaries/node",
148
+ "NVM_NODEJS_ORG_MIRROR": "https://cdn.npmmirror.com/binaries/node",
149
+ "PHANTOMJS_CDNURL": "https://cdn.npmmirror.com/binaries/phantomjs",
150
+ "CHROMEDRIVER_CDNURL": "https://cdn.npmmirror.com/binaries/chromedriver",
151
+ "OPERADRIVER_CDNURL": "https://cdn.npmmirror.com/binaries/operadriver",
152
+ "CYPRESS_DOWNLOAD_PATH_TEMPLATE": "https://cdn.npmmirror.com/binaries/cypress/${version}/${platform}-${arch}/cypress.zip",
153
+ "ELECTRON_MIRROR": "https://cdn.npmmirror.com/binaries/electron/",
154
+ "ELECTRON_BUILDER_BINARIES_MIRROR": "https://cdn.npmmirror.com/binaries/electron-builder-binaries/",
155
+ "SASS_BINARY_SITE": "https://cdn.npmmirror.com/binaries/node-sass",
156
+ "SWC_BINARY_SITE": "https://cdn.npmmirror.com/binaries/node-swc",
157
+ "NWJS_URLBASE": "https://cdn.npmmirror.com/binaries/nwjs/v",
158
+ "PUPPETEER_DOWNLOAD_HOST": "https://cdn.npmmirror.com/binaries/chrome-for-testing",
159
+ "PUPPETEER_DOWNLOAD_BASE_URL": "https://cdn.npmmirror.com/binaries/chrome-for-testing",
160
+ "PLAYWRIGHT_DOWNLOAD_HOST": "https://cdn.npmmirror.com/binaries/playwright",
161
+ "SENTRYCLI_CDNURL": "https://cdn.npmmirror.com/binaries/sentry-cli",
162
+ "SAUCECTL_INSTALL_BINARY_MIRROR": "https://cdn.npmmirror.com/binaries/saucectl",
163
+ "RE2_DOWNLOAD_MIRROR": "https://cdn.npmmirror.com/binaries/node-re2",
164
+ "RE2_DOWNLOAD_SKIP_PATH": "true",
165
+ "PRISMA_ENGINES_MIRROR": "https://cdn.npmmirror.com/binaries/prisma",
166
+ "npm_config_better_sqlite3_binary_host": "https://cdn.npmmirror.com/binaries/better-sqlite3",
167
+ "npm_config_keytar_binary_host": "https://cdn.npmmirror.com/binaries/keytar",
168
+ "npm_config_sharp_binary_host": "https://cdn.npmmirror.com/binaries/sharp",
169
+ "npm_config_sharp_libvips_binary_host": "https://cdn.npmmirror.com/binaries/sharp-libvips",
170
+ "npm_config_robotjs_binary_host": "https://cdn.npmmirror.com/binaries/robotjs"
171
+ }
172
+ }
@@ -0,0 +1,128 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, religion, or sexual identity
10
+ and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ - Demonstrating empathy and kindness toward other people
21
+ - Being respectful of differing opinions, viewpoints, and experiences
22
+ - Giving and gracefully accepting constructive feedback
23
+ - Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ - Focusing on what is best not just for us as individuals, but for the
26
+ overall community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ - The use of sexualized language or imagery, and sexual attention or
31
+ advances of any kind
32
+ - Trolling, insulting or derogatory comments, and personal or political attacks
33
+ - Public or private harassment
34
+ - Publishing others' private information, such as a physical or email
35
+ address, without their explicit permission
36
+ - Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official e-mail address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ 1324318532@qq.com.
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series
86
+ of actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or
93
+ permanent ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within
113
+ the community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.0, available at
119
+ https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120
+
121
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct
122
+ enforcement ladder](https://github.com/mozilla/diversity).
123
+
124
+ [homepage]: https://www.contributor-covenant.org
125
+
126
+ For answers to common questions about this code of conduct, see the FAQ at
127
+ https://www.contributor-covenant.org/faq. Translations are available at
128
+ https://www.contributor-covenant.org/translations.
@@ -0,0 +1,3 @@
1
+ # Contributing
2
+
3
+ TODO
@@ -0,0 +1,27 @@
1
+ FROM node:22-alpine AS base
2
+ ENV PNPM_HOME="/pnpm"
3
+ ENV PATH="$PNPM_HOME:$PATH"
4
+ RUN corepack enable
5
+
6
+ FROM base AS builder
7
+ COPY . /usr/src/app
8
+ WORKDIR /usr/src/app
9
+ RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
10
+ RUN pnpm run -r build \
11
+ && pnpm deploy --filter=@icebreakers/foo --prod /prod/foo \
12
+ && pnpm deploy --filter=@icebreakers/bar --prod /prod/bar
13
+
14
+ FROM base AS foo
15
+ COPY --from=builder /prod/foo /prod/foo
16
+ WORKDIR /prod/foo
17
+ EXPOSE 8000
18
+ CMD [ "pnpm", "start" ]
19
+
20
+ FROM base AS bar
21
+ COPY --from=builder /prod/bar /prod/bar
22
+ WORKDIR /prod/bar
23
+ EXPOSE 8001
24
+ CMD [ "pnpm", "start" ]
25
+
26
+ # docker build . --target foo --tag foo:latest
27
+ # docker build . --target bar --tag bar:latest
package/assets/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 ice breaker
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,21 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ Use this section to tell people about which versions of your project are
6
+ currently being supported with security updates.
7
+
8
+ | Version | Supported |
9
+ | ------- | ------------------ |
10
+ | 5.1.x | :white_check_mark: |
11
+ | 5.0.x | :x: |
12
+ | 4.0.x | :white_check_mark: |
13
+ | < 4.0 | :x: |
14
+
15
+ ## Reporting a Vulnerability
16
+
17
+ Use this section to tell people how to report a vulnerability.
18
+
19
+ Tell them where to go, how often they can expect to get an update on a
20
+ reported vulnerability, what to expect if the vulnerability is accepted or
21
+ declined, etc.
@@ -0,0 +1,3 @@
1
+ import { icebreaker } from '@icebreakers/commitlint-config'
2
+
3
+ export default icebreaker()
@@ -0,0 +1,7 @@
1
+ import { icebreaker } from '@icebreakers/eslint-config'
2
+
3
+ export default icebreaker(
4
+ {
5
+ ignores: ['**/fixtures/**'],
6
+ },
7
+ )
@@ -0,0 +1,38 @@
1
+ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2
+
3
+ # dependencies
4
+ node_modules
5
+ .pnp
6
+ .pnp.js
7
+
8
+ # testing
9
+ coverage
10
+
11
+ # next.js
12
+ .next/
13
+ out/
14
+ build
15
+
16
+ # misc
17
+ .DS_Store
18
+ *.pem
19
+
20
+ # debug
21
+ npm-debug.log*
22
+ yarn-debug.log*
23
+ yarn-error.log*
24
+ .pnpm-debug.log*
25
+
26
+ # local env files
27
+ .env.local
28
+ .env.development.local
29
+ .env.test.local
30
+ .env.production.local
31
+
32
+ # turbo
33
+ .turbo
34
+
35
+ dist
36
+ vite.config.ts.timestamp-*.mjs
37
+ config.ts.timestamp-*.mjs
38
+ .vite-inspect
@@ -0,0 +1,11 @@
1
+ export default {
2
+ '*.{js,jsx,mjs,ts,tsx,mts,vue}': [
3
+ 'eslint --fix',
4
+ ],
5
+ '*.{json,md,mdx,css,html,yml,yaml,scss}': [
6
+ // 'prettier --with-node-modules --ignore-path .prettierignore --write',
7
+ 'eslint --fix',
8
+ ],
9
+ // for rust
10
+ // '*.rs': ['cargo fmt --'],
11
+ }
@@ -0,0 +1,22 @@
1
+ import { defineMonorepoConfig } from '@icebreakers/monorepo'
2
+
3
+ export default defineMonorepoConfig({
4
+ commands: {
5
+ create: {
6
+ defaultTemplate: 'unbuild',
7
+ renameJson: false,
8
+ },
9
+ clean: {
10
+ autoConfirm: false,
11
+ includePrivate: true,
12
+ },
13
+ sync: {
14
+ concurrency: 4,
15
+ command: 'cnpm sync {name}',
16
+ },
17
+ upgrade: {
18
+ skipOverwrite: false,
19
+ mergeTargets: true,
20
+ },
21
+ },
22
+ })
@@ -0,0 +1,14 @@
1
+ [build]
2
+ publish = "dist"
3
+ command = "pnpm run build"
4
+
5
+ [build.environment]
6
+ NODE_VERSION = "22"
7
+
8
+ [[redirects]]
9
+ from = "/*"
10
+ to = "/index.html"
11
+ status = 200
12
+
13
+ [context.deploy-preview]
14
+ ignore = "exit 0"
@@ -0,0 +1,88 @@
1
+ {
2
+ "name": "monorepo-template",
3
+ "type": "module",
4
+ "version": "0.0.0",
5
+ "private": true,
6
+ "packageManager": "pnpm@10.28.0",
7
+ "author": "ice breaker <1324318532@qq.com>",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/sonofmagic/monorepo-template.git"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/sonofmagic/monorepo-template/issues"
14
+ },
15
+ "engines": {
16
+ "node": ">=20.0.0"
17
+ },
18
+ "scripts": {
19
+ "build": "turbo run build",
20
+ "dev": "turbo run dev --parallel",
21
+ "test": "vitest run",
22
+ "test:dev": "vitest",
23
+ "lint": "turbo run lint",
24
+ "audit": "pnpm audit --audit-level=moderate",
25
+ "audit:fix": "pnpm audit --fix",
26
+ "typecheck": "turbo run typecheck",
27
+ "format": "eslint . --fix",
28
+ "validate": "pnpm run typecheck && pnpm run lint && pnpm run test",
29
+ "release": "changeset",
30
+ "publish-packages": "turbo run build lint test && changeset version && changeset publish",
31
+ "------": "--------------",
32
+ "preinstall": "npx only-allow pnpm",
33
+ "prepare": "husky",
34
+ "commit": "commit",
35
+ "commitlint": "commitlint --edit",
36
+ "-------": "---------------",
37
+ "pr:alpha": "changeset pre enter alpha",
38
+ "pr:beta": "changeset pre enter beta",
39
+ "pr:rc": "changeset pre enter rc",
40
+ "pr:exit": "changeset pre exit",
41
+ "--------": "----------------",
42
+ "script:init": "monorepo init",
43
+ "script:sync": "monorepo sync",
44
+ "script:clean": "monorepo clean",
45
+ "script:mirror": "monorepo mirror"
46
+ },
47
+ "devDependencies": {
48
+ "@changesets/cli": "^2.29.8",
49
+ "@commitlint/cli": "^20.3.1",
50
+ "@icebreakers/changelog-github": "^0.1.0",
51
+ "@icebreakers/commitlint-config": "^1.2.5",
52
+ "@icebreakers/eslint-config": "^1.6.13",
53
+ "@icebreakers/monorepo": "workspace:*",
54
+ "@icebreakers/stylelint-config": "^1.2.5",
55
+ "@types/fs-extra": "^11.0.4",
56
+ "@types/node": "^25.0.8",
57
+ "@types/semver": "^7.7.1",
58
+ "@vitest/coverage-v8": "~4.0.17",
59
+ "ci-info": "^4.3.1",
60
+ "cross-env": "^10.1.0",
61
+ "defu": "^6.1.4",
62
+ "es-toolkit": "^1.43.0",
63
+ "eslint": "^9.39.2",
64
+ "execa": "^9.6.1",
65
+ "fs-extra": "^11.3.3",
66
+ "husky": "^9.1.7",
67
+ "lint-staged": "^16.2.7",
68
+ "only-allow": "^1.2.2",
69
+ "pathe": "^2.0.3",
70
+ "pkg-types": "^2.3.0",
71
+ "rimraf": "^6.1.2",
72
+ "stylelint": "^16.26.1",
73
+ "tsdown": "0.19.0",
74
+ "tslib": "^2.8.1",
75
+ "tsup": "^8.5.1",
76
+ "tsx": "^4.21.0",
77
+ "turbo": "^2.7.4",
78
+ "type-fest": "^5.4.1",
79
+ "typescript": "^5.9.3",
80
+ "unbuild": "^3.6.1",
81
+ "vitest": "~4.0.17",
82
+ "yaml": "^2.8.2"
83
+ },
84
+ "publishConfig": {
85
+ "access": "public",
86
+ "registry": "https://registry.npmjs.org"
87
+ }
88
+ }
@@ -0,0 +1,11 @@
1
+ packages:
2
+ - apps/*
3
+ - packages/*
4
+ - templates/*
5
+ - '!**/test/**'
6
+
7
+ onlyBuiltDependencies:
8
+ - '@tailwindcss/oxide'
9
+ - esbuild
10
+ - sharp
11
+ - workerd
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
+ "extends": [
4
+ "config:recommended",
5
+ "group:allNonMajor",
6
+ ":semanticCommitTypeAll(chore)"
7
+ ],
8
+ "commitBody": "[skip netlify]",
9
+ "rangeStrategy": "bump",
10
+ "npm": {
11
+ "commitMessageTopic": "{{prettyDepType}} {{depName}}"
12
+ },
13
+ "ignoreDeps": [
14
+ "node"
15
+ ],
16
+ "automerge": true,
17
+ "automergeType": "pr",
18
+ "packageRules": [
19
+ {
20
+ "matchUpdateTypes": [
21
+ "minor",
22
+ "patch",
23
+ "pin",
24
+ "digest"
25
+ ]
26
+ }
27
+ ]
28
+ }
@@ -0,0 +1,3 @@
1
+ import { icebreaker } from '@icebreakers/stylelint-config'
2
+
3
+ export default icebreaker()
@@ -0,0 +1,51 @@
1
+ {
2
+ "compilerOptions": {
3
+ // 指定 ECMAScript 目标版本,ESNext 表示支持最新的 ES 特性
4
+ "target": "ESNext",
5
+
6
+ // 指定模块系统,ESNext 使用原生 ES 模块 (import/export)
7
+ "module": "ESNext",
8
+
9
+ // 模块解析策略,Bundler 模式适用于打包工具(如 Vite、Webpack),支持更宽松的解析规则
10
+ "moduleResolution": "Bundler",
11
+
12
+ // 允许导入 .json 文件,并自动生成类型声明
13
+ "resolveJsonModule": true,
14
+
15
+ // 指定要包含的类型声明文件,node 提供 Node.js API 类型,vitest/globals 提供测试全局变量类型
16
+ "types": [
17
+ "node",
18
+ "vitest/globals"
19
+ ],
20
+
21
+ // 允许编译 JavaScript 文件,使其可以被导入和进行类型检查
22
+ "allowJs": true,
23
+
24
+ // 启用所有严格类型检查选项,包括 noImplicitAny、strictNullChecks 等
25
+ "strict": true,
26
+
27
+ // 严格检查可选属性类型,区分 undefined 和缺失的属性
28
+ "exactOptionalPropertyTypes": true,
29
+
30
+ // 要求子类重写父类方法时必须使用 override 关键字
31
+ "noImplicitOverride": true,
32
+
33
+ // 禁止通过索引签名(如 obj['key'])访问未在索引签名中定义的属性
34
+ "noPropertyAccessFromIndexSignature": true,
35
+
36
+ // 访问索引签名时返回 undefined | T,而不是 T(防止未定义访问错误)
37
+ "noUncheckedIndexedAccess": true,
38
+
39
+ // 不生成输出文件(仅用于类型检查,实际由打包工具处理编译)
40
+ "noEmit": true,
41
+
42
+ // 允许从没有默认导出的模块中默认导入(如 import React from 'react')
43
+ "allowSyntheticDefaultImports": true,
44
+
45
+ // 启用 ES 模块互操作性,为 CommonJS 模块提供 synthetic default imports
46
+ "esModuleInterop": true,
47
+
48
+ // 跳过库文件的类型检查,提高编译速度(库文件通常已经有类型声明)
49
+ "skipLibCheck": true
50
+ }
51
+ }