create-rslib 0.19.3 → 0.19.4

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 (340) hide show
  1. package/dist/index.js +114 -295
  2. package/package.json +4 -5
  3. package/{template-[react]-[]-js → template-react-js}/package.json +2 -2
  4. package/{template-[react]-[]-ts → template-react-ts}/package.json +3 -3
  5. package/{template-[react]-[rstest]-ts → template-react-ts}/src/Button.tsx +18 -1
  6. package/template-rspress/AGENTS.md +10 -0
  7. package/template-rspress/react-ts/docs/Button.mdx +31 -0
  8. package/template-rspress/react-ts/docs/_meta.json +1 -0
  9. package/template-rspress/react-ts/docs/index.mdx +4 -0
  10. package/template-rspress/react-ts/package.json +15 -0
  11. package/template-rspress/react-ts/rspress.config.ts +27 -0
  12. package/{template-[react]-[rstest,storybook]-ts → template-rspress/react-ts}/tsconfig.json +5 -2
  13. package/template-rstest/AGENTS.md +10 -0
  14. package/template-rstest/node-js/package.json +10 -0
  15. package/template-rstest/node-ts/package.json +10 -0
  16. package/template-rstest/react-js/package.json +13 -0
  17. package/template-rstest/react-ts/package.json +13 -0
  18. package/template-rstest/vue-js/package.json +14 -0
  19. package/template-rstest/vue-ts/package.json +14 -0
  20. package/template-storybook/AGENTS.md +6 -0
  21. package/template-storybook/react-js/package.json +15 -0
  22. package/template-storybook/react-ts/package.json +15 -0
  23. package/template-storybook/vue-js/package.json +15 -0
  24. package/template-storybook/vue-ts/package.json +15 -0
  25. package/template-vitest/node-js/package.json +8 -0
  26. package/template-vitest/node-ts/package.json +8 -0
  27. package/template-vitest/react-js/package.json +11 -0
  28. package/template-vitest/react-ts/package.json +11 -0
  29. package/template-vitest/vue-js/package.json +12 -0
  30. package/template-vitest/vue-ts/package.json +12 -0
  31. package/{template-[vue]-[vitest]-js/vitest.config.js → template-vitest/vue-ts/vitest.config.ts} +1 -1
  32. package/{template-[vue]-[]-js → template-vue-js}/package.json +1 -1
  33. package/{template-[vue]-[]-ts → template-vue-ts}/package.json +2 -2
  34. package/template-[node-dual]-[rstest]-js/AGENTS.md +0 -5
  35. package/template-[node-dual]-[rstest]-js/package.json +0 -25
  36. package/template-[node-dual]-[rstest]-js/rslib.config.mjs +0 -14
  37. package/template-[node-dual]-[rstest]-ts/AGENTS.md +0 -5
  38. package/template-[node-dual]-[rstest]-ts/package.json +0 -29
  39. package/template-[node-dual]-[rstest]-ts/rslib.config.ts +0 -15
  40. package/template-[node-dual]-[vitest]-js/package.json +0 -24
  41. package/template-[node-dual]-[vitest]-js/rslib.config.mjs +0 -14
  42. package/template-[node-dual]-[vitest]-js/src/index.js +0 -1
  43. package/template-[node-dual]-[vitest]-ts/AGENTS.md +0 -5
  44. package/template-[node-dual]-[vitest]-ts/package.json +0 -28
  45. package/template-[node-dual]-[vitest]-ts/rslib.config.ts +0 -15
  46. package/template-[node-dual]-[vitest]-ts/src/index.ts +0 -1
  47. package/template-[node-dual]-[vitest]-ts/tsconfig.json +0 -15
  48. package/template-[node-esm]-[]-js/src/index.js +0 -1
  49. package/template-[node-esm]-[]-ts/src/index.ts +0 -1
  50. package/template-[node-esm]-[]-ts/tsconfig.json +0 -15
  51. package/template-[node-esm]-[rstest]-js/AGENTS.md +0 -5
  52. package/template-[node-esm]-[rstest]-js/package.json +0 -23
  53. package/template-[node-esm]-[rstest]-js/rslib.config.mjs +0 -10
  54. package/template-[node-esm]-[rstest]-js/rstest.config.js +0 -6
  55. package/template-[node-esm]-[rstest]-js/src/index.js +0 -1
  56. package/template-[node-esm]-[rstest]-js/tests/index.test.js +0 -7
  57. package/template-[node-esm]-[rstest]-ts/AGENTS.md +0 -5
  58. package/template-[node-esm]-[rstest]-ts/package.json +0 -27
  59. package/template-[node-esm]-[rstest]-ts/rslib.config.ts +0 -11
  60. package/template-[node-esm]-[rstest]-ts/rstest.config.ts +0 -6
  61. package/template-[node-esm]-[rstest]-ts/src/index.ts +0 -1
  62. package/template-[node-esm]-[rstest]-ts/tests/index.test.ts +0 -7
  63. package/template-[node-esm]-[rstest]-ts/tsconfig.json +0 -15
  64. package/template-[node-esm]-[vitest]-js/AGENTS.md +0 -5
  65. package/template-[node-esm]-[vitest]-js/package.json +0 -22
  66. package/template-[node-esm]-[vitest]-js/rslib.config.mjs +0 -10
  67. package/template-[node-esm]-[vitest]-js/src/index.js +0 -1
  68. package/template-[node-esm]-[vitest]-js/tests/index.test.js +0 -7
  69. package/template-[node-esm]-[vitest]-js/vitest.config.js +0 -8
  70. package/template-[node-esm]-[vitest]-ts/AGENTS.md +0 -5
  71. package/template-[node-esm]-[vitest]-ts/package.json +0 -26
  72. package/template-[node-esm]-[vitest]-ts/rslib.config.ts +0 -11
  73. package/template-[node-esm]-[vitest]-ts/src/index.ts +0 -1
  74. package/template-[node-esm]-[vitest]-ts/tests/index.test.ts +0 -7
  75. package/template-[node-esm]-[vitest]-ts/tsconfig.json +0 -15
  76. package/template-[node-esm]-[vitest]-ts/vitest.config.ts +0 -6
  77. package/template-[react]-[]-ts/src/Button.tsx +0 -29
  78. package/template-[react]-[rstest,storybook]-js/AGENTS.md +0 -9
  79. package/template-[react]-[rstest,storybook]-js/package.json +0 -41
  80. package/template-[react]-[rstest,storybook]-js/rslib.config.mjs +0 -20
  81. package/template-[react]-[rstest,storybook]-js/src/Button.jsx +0 -21
  82. package/template-[react]-[rstest,storybook]-js/src/button.css +0 -34
  83. package/template-[react]-[rstest,storybook]-js/src/index.jsx +0 -1
  84. package/template-[react]-[rstest,storybook]-ts/AGENTS.md +0 -9
  85. package/template-[react]-[rstest,storybook]-ts/package.json +0 -45
  86. package/template-[react]-[rstest,storybook]-ts/rslib.config.ts +0 -21
  87. package/template-[react]-[rstest,storybook]-ts/src/Button.tsx +0 -29
  88. package/template-[react]-[rstest,storybook]-ts/src/button.css +0 -34
  89. package/template-[react]-[rstest,storybook]-ts/src/index.tsx +0 -1
  90. package/template-[react]-[rstest]-js/AGENTS.md +0 -5
  91. package/template-[react]-[rstest]-js/package.json +0 -32
  92. package/template-[react]-[rstest]-js/rslib.config.mjs +0 -20
  93. package/template-[react]-[rstest]-js/src/Button.jsx +0 -21
  94. package/template-[react]-[rstest]-js/src/button.css +0 -34
  95. package/template-[react]-[rstest]-js/src/index.jsx +0 -1
  96. package/template-[react]-[rstest]-js/tests/index.test.jsx +0 -11
  97. package/template-[react]-[rstest]-ts/AGENTS.md +0 -5
  98. package/template-[react]-[rstest]-ts/package.json +0 -36
  99. package/template-[react]-[rstest]-ts/rslib.config.ts +0 -21
  100. package/template-[react]-[rstest]-ts/src/button.css +0 -34
  101. package/template-[react]-[rstest]-ts/src/index.tsx +0 -1
  102. package/template-[react]-[rstest]-ts/tests/index.test.tsx +0 -11
  103. package/template-[react]-[rstest]-ts/tsconfig.json +0 -14
  104. package/template-[react]-[storybook,vitest]-js/.storybook/main.js +0 -39
  105. package/template-[react]-[storybook,vitest]-js/AGENTS.md +0 -9
  106. package/template-[react]-[storybook,vitest]-js/package.json +0 -40
  107. package/template-[react]-[storybook,vitest]-js/rslib.config.mjs +0 -20
  108. package/template-[react]-[storybook,vitest]-js/src/Button.jsx +0 -21
  109. package/template-[react]-[storybook,vitest]-js/src/button.css +0 -34
  110. package/template-[react]-[storybook,vitest]-js/src/index.jsx +0 -1
  111. package/template-[react]-[storybook,vitest]-js/stories/Button.stories.jsx +0 -50
  112. package/template-[react]-[storybook,vitest]-ts/.storybook/main.ts +0 -41
  113. package/template-[react]-[storybook,vitest]-ts/.storybook/preview.ts +0 -14
  114. package/template-[react]-[storybook,vitest]-ts/AGENTS.md +0 -9
  115. package/template-[react]-[storybook,vitest]-ts/package.json +0 -44
  116. package/template-[react]-[storybook,vitest]-ts/rslib.config.ts +0 -21
  117. package/template-[react]-[storybook,vitest]-ts/src/Button.tsx +0 -29
  118. package/template-[react]-[storybook,vitest]-ts/src/button.css +0 -34
  119. package/template-[react]-[storybook,vitest]-ts/src/index.tsx +0 -1
  120. package/template-[react]-[storybook,vitest]-ts/stories/Button.stories.ts +0 -52
  121. package/template-[react]-[storybook,vitest]-ts/tests/tsconfig.json +0 -4
  122. package/template-[react]-[storybook,vitest]-ts/tsconfig.json +0 -14
  123. package/template-[react]-[storybook]-js/.storybook/main.js +0 -39
  124. package/template-[react]-[storybook]-js/.storybook/preview.js +0 -12
  125. package/template-[react]-[storybook]-js/AGENTS.md +0 -5
  126. package/template-[react]-[storybook]-js/package.json +0 -35
  127. package/template-[react]-[storybook]-js/rslib.config.mjs +0 -20
  128. package/template-[react]-[storybook]-js/src/Button.jsx +0 -21
  129. package/template-[react]-[storybook]-js/src/button.css +0 -34
  130. package/template-[react]-[storybook]-js/src/index.jsx +0 -1
  131. package/template-[react]-[storybook]-js/stories/Button.stories.jsx +0 -50
  132. package/template-[react]-[storybook]-ts/.storybook/main.ts +0 -41
  133. package/template-[react]-[storybook]-ts/.storybook/preview.ts +0 -14
  134. package/template-[react]-[storybook]-ts/AGENTS.md +0 -5
  135. package/template-[react]-[storybook]-ts/package.json +0 -39
  136. package/template-[react]-[storybook]-ts/rslib.config.ts +0 -21
  137. package/template-[react]-[storybook]-ts/src/Button.tsx +0 -29
  138. package/template-[react]-[storybook]-ts/src/button.css +0 -34
  139. package/template-[react]-[storybook]-ts/src/index.tsx +0 -1
  140. package/template-[react]-[storybook]-ts/stories/Button.stories.ts +0 -52
  141. package/template-[react]-[storybook]-ts/tsconfig.json +0 -14
  142. package/template-[react]-[vitest]-js/AGENTS.md +0 -5
  143. package/template-[react]-[vitest]-js/package.json +0 -31
  144. package/template-[react]-[vitest]-js/rslib.config.mjs +0 -20
  145. package/template-[react]-[vitest]-js/src/Button.jsx +0 -21
  146. package/template-[react]-[vitest]-js/src/button.css +0 -34
  147. package/template-[react]-[vitest]-js/src/index.jsx +0 -1
  148. package/template-[react]-[vitest]-js/tests/index.test.jsx +0 -11
  149. package/template-[react]-[vitest]-js/vitest.config.js +0 -11
  150. package/template-[react]-[vitest]-ts/AGENTS.md +0 -5
  151. package/template-[react]-[vitest]-ts/package.json +0 -35
  152. package/template-[react]-[vitest]-ts/rslib.config.ts +0 -21
  153. package/template-[react]-[vitest]-ts/src/Button.tsx +0 -29
  154. package/template-[react]-[vitest]-ts/src/button.css +0 -34
  155. package/template-[react]-[vitest]-ts/src/index.tsx +0 -1
  156. package/template-[react]-[vitest]-ts/tests/index.test.tsx +0 -11
  157. package/template-[react]-[vitest]-ts/tests/tsconfig.json +0 -4
  158. package/template-[react]-[vitest]-ts/tsconfig.json +0 -14
  159. package/template-[react]-[vitest]-ts/vitest.config.ts +0 -9
  160. package/template-[vue]-[rstest,storybook]-js/.storybook/preview.js +0 -12
  161. package/template-[vue]-[rstest,storybook]-js/AGENTS.md +0 -9
  162. package/template-[vue]-[rstest,storybook]-js/package.json +0 -43
  163. package/template-[vue]-[rstest,storybook]-js/rslib.config.ts +0 -15
  164. package/template-[vue]-[rstest,storybook]-js/rstest.config.js +0 -7
  165. package/template-[vue]-[rstest,storybook]-js/rstest.setup.js +0 -4
  166. package/template-[vue]-[rstest,storybook]-js/src/Button.vue +0 -43
  167. package/template-[vue]-[rstest,storybook]-js/src/index.js +0 -1
  168. package/template-[vue]-[rstest,storybook]-js/src/style.css +0 -34
  169. package/template-[vue]-[rstest,storybook]-ts/AGENTS.md +0 -9
  170. package/template-[vue]-[rstest,storybook]-ts/package.json +0 -45
  171. package/template-[vue]-[rstest,storybook]-ts/rslib.config.ts +0 -15
  172. package/template-[vue]-[rstest,storybook]-ts/rstest.config.ts +0 -7
  173. package/template-[vue]-[rstest,storybook]-ts/rstest.setup.ts +0 -4
  174. package/template-[vue]-[rstest,storybook]-ts/src/Button.vue +0 -35
  175. package/template-[vue]-[rstest,storybook]-ts/src/index.ts +0 -1
  176. package/template-[vue]-[rstest,storybook]-ts/src/style.css +0 -34
  177. package/template-[vue]-[rstest,storybook]-ts/tests/test.d.ts +0 -1
  178. package/template-[vue]-[rstest,storybook]-ts/tests/tsconfig.json +0 -4
  179. package/template-[vue]-[rstest,storybook]-ts/tsconfig.json +0 -24
  180. package/template-[vue]-[rstest]-js/AGENTS.md +0 -5
  181. package/template-[vue]-[rstest]-js/package.json +0 -34
  182. package/template-[vue]-[rstest]-js/rslib.config.ts +0 -15
  183. package/template-[vue]-[rstest]-js/rstest.config.js +0 -7
  184. package/template-[vue]-[rstest]-js/rstest.setup.js +0 -4
  185. package/template-[vue]-[rstest]-js/src/Button.vue +0 -43
  186. package/template-[vue]-[rstest]-js/src/index.js +0 -1
  187. package/template-[vue]-[rstest]-js/src/style.css +0 -34
  188. package/template-[vue]-[rstest]-js/tests/index.test.js +0 -16
  189. package/template-[vue]-[rstest]-ts/AGENTS.md +0 -5
  190. package/template-[vue]-[rstest]-ts/package.json +0 -36
  191. package/template-[vue]-[rstest]-ts/rslib.config.ts +0 -15
  192. package/template-[vue]-[rstest]-ts/rstest.config.ts +0 -7
  193. package/template-[vue]-[rstest]-ts/rstest.setup.ts +0 -4
  194. package/template-[vue]-[rstest]-ts/src/Button.vue +0 -35
  195. package/template-[vue]-[rstest]-ts/src/index.ts +0 -1
  196. package/template-[vue]-[rstest]-ts/src/style.css +0 -34
  197. package/template-[vue]-[rstest]-ts/tests/index.test.ts +0 -16
  198. package/template-[vue]-[rstest]-ts/tests/test.d.ts +0 -1
  199. package/template-[vue]-[rstest]-ts/tests/tsconfig.json +0 -4
  200. package/template-[vue]-[rstest]-ts/tsconfig.json +0 -24
  201. package/template-[vue]-[storybook,vitest]-js/.storybook/main.js +0 -38
  202. package/template-[vue]-[storybook,vitest]-js/.storybook/preview.js +0 -12
  203. package/template-[vue]-[storybook,vitest]-js/AGENTS.md +0 -9
  204. package/template-[vue]-[storybook,vitest]-js/package.json +0 -42
  205. package/template-[vue]-[storybook,vitest]-js/rslib.config.ts +0 -15
  206. package/template-[vue]-[storybook,vitest]-js/src/Button.vue +0 -43
  207. package/template-[vue]-[storybook,vitest]-js/src/index.js +0 -1
  208. package/template-[vue]-[storybook,vitest]-js/src/style.css +0 -34
  209. package/template-[vue]-[storybook,vitest]-js/stories/Button.stories.js +0 -50
  210. package/template-[vue]-[storybook,vitest]-js/vitest.setup.js +0 -1
  211. package/template-[vue]-[storybook,vitest]-ts/.storybook/main.ts +0 -40
  212. package/template-[vue]-[storybook,vitest]-ts/.storybook/preview.ts +0 -12
  213. package/template-[vue]-[storybook,vitest]-ts/AGENTS.md +0 -9
  214. package/template-[vue]-[storybook,vitest]-ts/package.json +0 -44
  215. package/template-[vue]-[storybook,vitest]-ts/rslib.config.ts +0 -15
  216. package/template-[vue]-[storybook,vitest]-ts/src/Button.vue +0 -35
  217. package/template-[vue]-[storybook,vitest]-ts/src/index.ts +0 -1
  218. package/template-[vue]-[storybook,vitest]-ts/src/style.css +0 -34
  219. package/template-[vue]-[storybook,vitest]-ts/stories/Button.stories.js +0 -50
  220. package/template-[vue]-[storybook,vitest]-ts/tsconfig.json +0 -24
  221. package/template-[vue]-[storybook,vitest]-ts/vitest.config.js +0 -13
  222. package/template-[vue]-[storybook,vitest]-ts/vitest.setup.js +0 -1
  223. package/template-[vue]-[storybook]-js/.storybook/main.js +0 -38
  224. package/template-[vue]-[storybook]-js/.storybook/preview.js +0 -12
  225. package/template-[vue]-[storybook]-js/AGENTS.md +0 -5
  226. package/template-[vue]-[storybook]-js/package.json +0 -36
  227. package/template-[vue]-[storybook]-js/rslib.config.ts +0 -15
  228. package/template-[vue]-[storybook]-js/src/Button.vue +0 -43
  229. package/template-[vue]-[storybook]-js/src/index.js +0 -1
  230. package/template-[vue]-[storybook]-js/src/style.css +0 -34
  231. package/template-[vue]-[storybook]-js/stories/Button.stories.js +0 -50
  232. package/template-[vue]-[storybook]-ts/.storybook/main.ts +0 -40
  233. package/template-[vue]-[storybook]-ts/.storybook/preview.ts +0 -12
  234. package/template-[vue]-[storybook]-ts/AGENTS.md +0 -5
  235. package/template-[vue]-[storybook]-ts/package.json +0 -38
  236. package/template-[vue]-[storybook]-ts/rslib.config.ts +0 -15
  237. package/template-[vue]-[storybook]-ts/src/Button.vue +0 -35
  238. package/template-[vue]-[storybook]-ts/src/index.ts +0 -1
  239. package/template-[vue]-[storybook]-ts/src/style.css +0 -34
  240. package/template-[vue]-[storybook]-ts/stories/Button.stories.js +0 -50
  241. package/template-[vue]-[storybook]-ts/tsconfig.json +0 -24
  242. package/template-[vue]-[vitest]-js/AGENTS.md +0 -5
  243. package/template-[vue]-[vitest]-js/package.json +0 -33
  244. package/template-[vue]-[vitest]-js/rslib.config.ts +0 -15
  245. package/template-[vue]-[vitest]-js/src/Button.vue +0 -43
  246. package/template-[vue]-[vitest]-js/src/index.js +0 -1
  247. package/template-[vue]-[vitest]-js/src/style.css +0 -34
  248. package/template-[vue]-[vitest]-js/tests/index.test.js +0 -16
  249. package/template-[vue]-[vitest]-js/vitest.setup.js +0 -1
  250. package/template-[vue]-[vitest]-ts/AGENTS.md +0 -5
  251. package/template-[vue]-[vitest]-ts/package.json +0 -35
  252. package/template-[vue]-[vitest]-ts/rslib.config.ts +0 -15
  253. package/template-[vue]-[vitest]-ts/src/Button.vue +0 -35
  254. package/template-[vue]-[vitest]-ts/src/index.ts +0 -1
  255. package/template-[vue]-[vitest]-ts/src/style.css +0 -34
  256. package/template-[vue]-[vitest]-ts/tests/index.test.ts +0 -16
  257. package/template-[vue]-[vitest]-ts/tsconfig.json +0 -24
  258. package/template-[vue]-[vitest]-ts/vitest.config.js +0 -13
  259. package/template-[vue]-[vitest]-ts/vitest.setup.js +0 -1
  260. /package/{template-[node-dual]-[]-js → template-node-dual-js}/package.json +0 -0
  261. /package/{template-[node-dual]-[]-js → template-node-dual-js}/rslib.config.mjs +0 -0
  262. /package/{template-[node-dual]-[]-js → template-node-dual-js}/src/index.js +0 -0
  263. /package/{template-[node-dual]-[]-ts → template-node-dual-ts}/package.json +0 -0
  264. /package/{template-[node-dual]-[]-ts → template-node-dual-ts}/rslib.config.ts +0 -0
  265. /package/{template-[node-dual]-[]-ts → template-node-dual-ts}/src/index.ts +0 -0
  266. /package/{template-[node-dual]-[]-ts → template-node-dual-ts}/tsconfig.json +0 -0
  267. /package/{template-[node-esm]-[]-js → template-node-esm-js}/package.json +0 -0
  268. /package/{template-[node-esm]-[]-js → template-node-esm-js}/rslib.config.mjs +0 -0
  269. /package/{template-[node-dual]-[rstest]-js → template-node-esm-js}/src/index.js +0 -0
  270. /package/{template-[node-esm]-[]-ts → template-node-esm-ts}/package.json +0 -0
  271. /package/{template-[node-esm]-[]-ts → template-node-esm-ts}/rslib.config.ts +0 -0
  272. /package/{template-[node-dual]-[rstest]-ts → template-node-esm-ts}/src/index.ts +0 -0
  273. /package/{template-[node-dual]-[rstest]-ts → template-node-esm-ts}/tsconfig.json +0 -0
  274. /package/{template-[react]-[]-js → template-react-js}/rslib.config.mjs +0 -0
  275. /package/{template-[react]-[]-js → template-react-js}/src/Button.jsx +0 -0
  276. /package/{template-[react]-[]-js → template-react-js}/src/button.css +0 -0
  277. /package/{template-[react]-[]-js → template-react-js}/src/index.jsx +0 -0
  278. /package/{template-[react]-[]-ts → template-react-ts}/rslib.config.ts +0 -0
  279. /package/{template-[react]-[]-ts → template-react-ts}/src/button.css +0 -0
  280. /package/{template-[react]-[]-ts → template-react-ts}/src/index.tsx +0 -0
  281. /package/{template-[react]-[]-ts → template-react-ts}/tsconfig.json +0 -0
  282. /package/{template-[node-dual]-[rstest]-js → template-rstest/node-js}/rstest.config.js +0 -0
  283. /package/{template-[node-dual]-[rstest]-js → template-rstest/node-js}/tests/index.test.js +0 -0
  284. /package/{template-[node-dual]-[rstest]-ts → template-rstest/node-ts}/rstest.config.ts +0 -0
  285. /package/{template-[node-dual]-[rstest]-ts → template-rstest/node-ts}/tests/index.test.ts +0 -0
  286. /package/{template-[react]-[rstest,storybook]-js → template-rstest/react-js}/rstest.config.js +0 -0
  287. /package/{template-[react]-[rstest,storybook]-js → template-rstest/react-js}/rstest.setup.js +0 -0
  288. /package/{template-[react]-[rstest,storybook]-js → template-rstest/react-js}/tests/index.test.jsx +0 -0
  289. /package/{template-[react]-[rstest,storybook]-ts → template-rstest/react-ts}/rstest.config.ts +0 -0
  290. /package/{template-[react]-[rstest,storybook]-ts → template-rstest/react-ts}/rstest.setup.ts +0 -0
  291. /package/{template-[react]-[rstest,storybook]-ts → template-rstest/react-ts}/tests/index.test.tsx +0 -0
  292. /package/{template-[react]-[rstest,storybook]-ts → template-rstest/react-ts}/tests/test.d.ts +0 -0
  293. /package/{template-[react]-[rstest,storybook]-ts → template-rstest/react-ts}/tests/tsconfig.json +0 -0
  294. /package/{template-[react]-[rstest]-js → template-rstest/vue-js}/rstest.config.js +0 -0
  295. /package/{template-[react]-[rstest]-js → template-rstest/vue-js}/rstest.setup.js +0 -0
  296. /package/{template-[vue]-[rstest,storybook]-js → template-rstest/vue-js}/tests/index.test.js +0 -0
  297. /package/{template-[react]-[rstest]-ts → template-rstest/vue-ts}/rstest.config.ts +0 -0
  298. /package/{template-[react]-[rstest]-ts → template-rstest/vue-ts}/rstest.setup.ts +0 -0
  299. /package/{template-[vue]-[rstest,storybook]-ts → template-rstest/vue-ts}/tests/index.test.ts +0 -0
  300. /package/{template-[react]-[rstest]-ts → template-rstest/vue-ts}/tests/test.d.ts +0 -0
  301. /package/{template-[react]-[rstest]-ts → template-rstest/vue-ts}/tests/tsconfig.json +0 -0
  302. /package/{template-[react]-[rstest,storybook]-js → template-storybook/react-js}/.storybook/main.js +0 -0
  303. /package/{template-[react]-[rstest,storybook]-js → template-storybook/react-js}/.storybook/preview.js +0 -0
  304. /package/{template-[react]-[rstest,storybook]-js → template-storybook/react-js}/stories/Button.stories.jsx +0 -0
  305. /package/{template-[react]-[rstest,storybook]-ts → template-storybook/react-ts}/.storybook/main.ts +0 -0
  306. /package/{template-[react]-[rstest,storybook]-ts → template-storybook/react-ts}/.storybook/preview.ts +0 -0
  307. /package/{template-[react]-[rstest,storybook]-ts → template-storybook/react-ts}/stories/Button.stories.ts +0 -0
  308. /package/{template-[vue]-[rstest,storybook]-js → template-storybook/vue-js}/.storybook/main.js +0 -0
  309. /package/{template-[react]-[storybook,vitest]-js → template-storybook/vue-js}/.storybook/preview.js +0 -0
  310. /package/{template-[vue]-[rstest,storybook]-js → template-storybook/vue-js}/stories/Button.stories.js +0 -0
  311. /package/{template-[vue]-[rstest,storybook]-ts → template-storybook/vue-ts}/.storybook/main.ts +0 -0
  312. /package/{template-[vue]-[rstest,storybook]-ts → template-storybook/vue-ts}/.storybook/preview.ts +0 -0
  313. /package/{template-[vue]-[rstest,storybook]-ts → template-storybook/vue-ts}/stories/Button.stories.js +0 -0
  314. /package/{template-[node-dual]-[vitest]-js → template-vitest}/AGENTS.md +0 -0
  315. /package/{template-[node-dual]-[vitest]-js → template-vitest/node-js}/tests/index.test.js +0 -0
  316. /package/{template-[node-dual]-[vitest]-js → template-vitest/node-js}/vitest.config.js +0 -0
  317. /package/{template-[node-dual]-[vitest]-ts → template-vitest/node-ts}/tests/index.test.ts +0 -0
  318. /package/{template-[node-dual]-[vitest]-ts → template-vitest/node-ts}/tests/tsconfig.json +0 -0
  319. /package/{template-[node-dual]-[vitest]-ts → template-vitest/node-ts}/vitest.config.ts +0 -0
  320. /package/{template-[react]-[storybook,vitest]-js → template-vitest/react-js}/tests/index.test.jsx +0 -0
  321. /package/{template-[react]-[storybook,vitest]-js → template-vitest/react-js}/vitest.config.js +0 -0
  322. /package/{template-[react]-[storybook,vitest]-js → template-vitest/react-js}/vitest.setup.js +0 -0
  323. /package/{template-[react]-[storybook,vitest]-ts → template-vitest/react-ts}/tests/index.test.tsx +0 -0
  324. /package/{template-[node-esm]-[vitest]-ts → template-vitest/react-ts}/tests/tsconfig.json +0 -0
  325. /package/{template-[react]-[storybook,vitest]-ts → template-vitest/react-ts}/vitest.config.ts +0 -0
  326. /package/{template-[react]-[storybook,vitest]-ts → template-vitest/react-ts}/vitest.setup.ts +0 -0
  327. /package/{template-[vue]-[storybook,vitest]-js → template-vitest/vue-js}/tests/index.test.js +0 -0
  328. /package/{template-[vue]-[storybook,vitest]-js → template-vitest/vue-js}/vitest.config.js +0 -0
  329. /package/{template-[react]-[vitest]-js → template-vitest/vue-js}/vitest.setup.js +0 -0
  330. /package/{template-[vue]-[storybook,vitest]-ts → template-vitest/vue-ts}/tests/index.test.ts +0 -0
  331. /package/{template-[react]-[vitest]-ts → template-vitest/vue-ts}/vitest.setup.ts +0 -0
  332. /package/{template-[vue]-[]-js → template-vue-js}/rslib.config.ts +0 -0
  333. /package/{template-[vue]-[]-js → template-vue-js}/src/Button.vue +0 -0
  334. /package/{template-[vue]-[]-js → template-vue-js}/src/index.js +0 -0
  335. /package/{template-[vue]-[]-js → template-vue-js}/src/style.css +0 -0
  336. /package/{template-[vue]-[]-ts → template-vue-ts}/rslib.config.ts +0 -0
  337. /package/{template-[vue]-[]-ts → template-vue-ts}/src/Button.vue +0 -0
  338. /package/{template-[vue]-[]-ts → template-vue-ts}/src/index.ts +0 -0
  339. /package/{template-[vue]-[]-ts → template-vue-ts}/src/style.css +0 -0
  340. /package/{template-[vue]-[]-ts → template-vue-ts}/tsconfig.json +0 -0
package/dist/index.js CHANGED
@@ -1,265 +1,31 @@
1
1
  #!/usr/bin/env node
2
+ import node_fs from "node:fs";
2
3
  import node_path from "node:path";
3
4
  import { fileURLToPath } from "node:url";
4
- import { BUILTIN_TOOLS, checkCancel, create, multiselect, select as external_create_rstack_select } from "create-rstack";
5
- import "node:fs";
6
- const helpers_filename = fileURLToPath(import.meta.url);
7
- const helpers_dirname = node_path.dirname(helpers_filename);
8
- node_path.resolve(helpers_dirname, '../fragments');
9
- const composeTemplateName = ({ template, tools, lang })=>`[${template}]-[${(tools ? tools.sort() : []).join(',')}]-${lang}`;
5
+ import { checkCancel, copyFolder, create, select as external_create_rstack_select } from "create-rstack";
10
6
  const TEMPLATES = [
11
- {
12
- template: 'node-dual',
13
- lang: 'js'
14
- },
15
- {
16
- template: 'node-dual',
17
- lang: 'ts'
18
- },
19
- {
20
- template: 'node-dual',
21
- lang: 'js',
22
- tools: {
23
- vitest: 'vitest-node-js'
24
- }
25
- },
26
- {
27
- template: 'node-dual',
28
- lang: 'ts',
29
- tools: {
30
- vitest: 'vitest-node-ts'
31
- }
32
- },
33
- {
34
- template: 'node-dual',
35
- lang: 'js',
36
- tools: {
37
- rstest: 'rstest-node-js'
38
- }
39
- },
40
- {
41
- template: 'node-dual',
42
- lang: 'ts',
43
- tools: {
44
- rstest: 'rstest-node-ts'
45
- }
46
- },
47
- {
48
- template: 'node-esm',
49
- lang: 'js'
50
- },
51
- {
52
- template: 'node-esm',
53
- lang: 'ts'
54
- },
55
- {
56
- template: 'node-esm',
57
- lang: 'js',
58
- tools: {
59
- vitest: 'vitest-node-js'
60
- }
61
- },
62
- {
63
- template: 'node-esm',
64
- lang: 'ts',
65
- tools: {
66
- vitest: 'vitest-node-ts'
67
- }
68
- },
69
- {
70
- template: 'node-esm',
71
- lang: 'js',
72
- tools: {
73
- rstest: 'rstest-node-js'
74
- }
75
- },
76
- {
77
- template: 'node-esm',
78
- lang: 'ts',
79
- tools: {
80
- rstest: 'rstest-node-ts'
81
- }
82
- },
83
- {
84
- template: 'react',
85
- lang: 'js'
86
- },
87
- {
88
- template: 'react',
89
- lang: 'js',
90
- tools: {
91
- storybook: 'storybook-react-js'
92
- }
93
- },
94
- {
95
- template: 'react',
96
- lang: 'js',
97
- tools: {
98
- vitest: 'vitest-react-js'
99
- }
100
- },
101
- {
102
- template: 'react',
103
- lang: 'js',
104
- tools: {
105
- rstest: 'rstest-react-js'
106
- }
107
- },
108
- {
109
- template: 'react',
110
- lang: 'js',
111
- tools: {
112
- storybook: 'storybook-react-js',
113
- vitest: 'vitest-react-js'
114
- }
115
- },
116
- {
117
- template: 'react',
118
- lang: 'js',
119
- tools: {
120
- storybook: 'storybook-react-js',
121
- rstest: 'rstest-react-js'
122
- }
123
- },
124
- {
125
- template: 'react',
126
- lang: 'ts'
127
- },
128
- {
129
- template: 'react',
130
- lang: 'ts',
131
- tools: {
132
- storybook: 'storybook-react-ts'
133
- }
134
- },
135
- {
136
- template: 'react',
137
- lang: 'ts',
138
- tools: {
139
- vitest: 'vitest-react-ts'
140
- }
141
- },
142
- {
143
- template: 'react',
144
- lang: 'ts',
145
- tools: {
146
- rstest: 'rstest-react-ts'
147
- }
148
- },
149
- {
150
- template: 'react',
151
- lang: 'ts',
152
- tools: {
153
- storybook: 'storybook-react-ts',
154
- vitest: 'vitest-react-ts'
155
- }
156
- },
157
- {
158
- template: 'react',
159
- lang: 'ts',
160
- tools: {
161
- storybook: 'storybook-react-ts',
162
- rstest: 'rstest-react-ts'
163
- }
164
- },
165
- {
166
- template: 'vue',
167
- lang: 'js'
168
- },
169
- {
170
- template: 'vue',
171
- lang: 'js',
172
- tools: {
173
- storybook: 'storybook-vue-js'
174
- }
175
- },
176
- {
177
- template: 'vue',
178
- lang: 'js',
179
- tools: {
180
- vitest: 'vitest-vue-js'
181
- }
182
- },
183
- {
184
- template: 'vue',
185
- lang: 'js',
186
- tools: {
187
- rstest: 'rstest-vue-js'
188
- }
189
- },
190
- {
191
- template: 'vue',
192
- lang: 'js',
193
- tools: {
194
- storybook: 'storybook-vue-js',
195
- vitest: 'vitest-vue-js'
196
- }
197
- },
198
- {
199
- template: 'vue',
200
- lang: 'js',
201
- tools: {
202
- storybook: 'storybook-vue-js',
203
- rstest: 'rstest-vue-js'
204
- }
205
- },
206
- {
207
- template: 'vue',
208
- lang: 'ts'
209
- },
210
- {
211
- template: 'vue',
212
- lang: 'ts',
213
- tools: {
214
- storybook: 'storybook-vue-ts'
215
- }
216
- },
217
- {
218
- template: 'vue',
219
- lang: 'ts',
220
- tools: {
221
- vitest: 'vitest-vue-ts'
222
- }
223
- },
224
- {
225
- template: 'vue',
226
- lang: 'ts',
227
- tools: {
228
- rstest: 'rstest-vue-ts'
229
- }
230
- },
231
- {
232
- template: 'vue',
233
- lang: 'ts',
234
- tools: {
235
- storybook: 'storybook-vue-ts',
236
- vitest: 'vitest-vue-ts'
237
- }
238
- },
239
- {
240
- template: 'vue',
241
- lang: 'ts',
242
- tools: {
243
- storybook: 'storybook-vue-ts',
244
- rstest: 'rstest-vue-ts'
245
- }
246
- }
7
+ 'node-dual-js',
8
+ 'node-dual-ts',
9
+ 'node-esm-js',
10
+ 'node-esm-ts',
11
+ 'react-js',
12
+ 'react-ts',
13
+ 'vue-js',
14
+ 'vue-ts'
247
15
  ];
248
16
  const src_dirname = node_path.dirname(fileURLToPath(import.meta.url));
249
- async function getTemplateName(argv) {
250
- if ('string' == typeof argv.template) {
251
- const pair = argv.template.split('-');
252
- const lang = pair[pair.length - 1] ?? 'ts';
17
+ function parseTemplateName(template) {
18
+ const pair = template.split('-');
19
+ const lastPart = pair[pair.length - 1];
20
+ if ('ts' === lastPart || 'js' === lastPart) {
253
21
  const rest = pair.slice(0, pair.length - 1).join('-');
254
- const tools = ('string' == typeof argv.tools ? [
255
- argv.tools
256
- ] : argv.tools ?? []).filter((tool)=>!BUILTIN_TOOLS.includes(tool));
257
- return composeTemplateName({
258
- template: rest,
259
- lang: lang,
260
- tools
261
- });
22
+ if (!rest) throw new Error(`Invalid template name: "${template}". Template name cannot be just a language suffix.`);
23
+ return `${rest}-${lastPart}`;
262
24
  }
25
+ return `${template}-ts`;
26
+ }
27
+ async function getTemplateName({ template }) {
28
+ if ('string' == typeof template) return parseTemplateName(template);
263
29
  const templateName = checkCancel(await external_create_rstack_select({
264
30
  message: 'Select template',
265
31
  options: [
@@ -294,54 +60,107 @@ async function getTemplateName(argv) {
294
60
  }
295
61
  ]
296
62
  }));
297
- const supportStorybook = [
298
- 'react',
299
- 'vue'
300
- ].includes(templateName);
301
- async function selectTools() {
302
- const tools = checkCancel(await multiselect({
303
- message: 'Select development tools (Use <space> to select, <enter> to continue)',
304
- required: false,
305
- options: [
306
- supportStorybook && {
307
- value: 'storybook',
308
- label: 'Storybook'
309
- },
310
- {
311
- value: 'rstest',
312
- label: 'Rstest'
313
- },
314
- {
315
- value: 'vitest',
316
- label: 'Vitest'
317
- }
318
- ].filter(Boolean)
319
- }));
320
- if (tools.includes('rstest') && tools.includes('vitest')) {
321
- console.error('You selected both Rstest and Vitest for testing, you should only select one of them.');
322
- return selectTools();
323
- }
324
- return tools;
325
- }
326
- const tools = await selectTools();
327
- return composeTemplateName({
328
- template: templateName,
329
- lang: language,
330
- tools
331
- });
63
+ return `${templateName}-${language}`;
332
64
  }
333
65
  function mapESLintTemplate(templateName) {
334
66
  const language = templateName.split('-').pop();
335
67
  return `vanilla-${language}`;
336
68
  }
69
+ function mapTestingToolTemplate(templateName) {
70
+ if (templateName.startsWith('react-')) return templateName;
71
+ if (templateName.startsWith('vue-')) return templateName;
72
+ if (templateName.startsWith('node-dual-')) return templateName.replace('node-dual-', 'node-');
73
+ if (templateName.startsWith('node-esm-')) return templateName.replace('node-esm-', 'node-');
74
+ const language = templateName.split('-').pop();
75
+ return `node-${language}`;
76
+ }
77
+ function getPackageName(distFolder) {
78
+ const pkgPath = node_path.join(distFolder, 'package.json');
79
+ const pkgContent = JSON.parse(node_fs.readFileSync(pkgPath, 'utf-8'));
80
+ return pkgContent.name;
81
+ }
82
+ function replacePackageNamePlaceholder(distFolder, files, packageName) {
83
+ for (const file of files){
84
+ const filePath = node_path.join(distFolder, file);
85
+ if (node_fs.existsSync(filePath)) {
86
+ const content = node_fs.readFileSync(filePath, 'utf-8');
87
+ const replaced = content.replace(/\{\{ packageName \}\}/g, packageName);
88
+ node_fs.writeFileSync(filePath, replaced);
89
+ }
90
+ }
91
+ }
337
92
  create({
338
93
  root: node_path.resolve(src_dirname, '..'),
339
94
  name: 'rslib',
340
- templates: TEMPLATES.map(({ template, tools, lang })=>composeTemplateName({
341
- template,
342
- lang,
343
- tools: Object.keys(tools || {})
344
- })),
95
+ templates: TEMPLATES,
345
96
  getTemplateName: getTemplateName,
346
- mapESLintTemplate: mapESLintTemplate
97
+ mapESLintTemplate: mapESLintTemplate,
98
+ extraTools: [
99
+ {
100
+ value: 'rspress',
101
+ label: 'Rspress - documentation',
102
+ when: (templateName)=>templateName.startsWith('react-ts'),
103
+ action: ({ templateName, distFolder, addAgentsMdSearchDirs })=>{
104
+ const toolFolder = node_path.join(src_dirname, '..', 'template-rspress');
105
+ const subFolder = node_path.join(toolFolder, templateName);
106
+ copyFolder({
107
+ from: subFolder,
108
+ to: distFolder,
109
+ isMergePackageJson: true
110
+ });
111
+ const packageName = getPackageName(distFolder);
112
+ replacePackageNamePlaceholder(distFolder, [
113
+ 'docs/Button.mdx',
114
+ 'tsconfig.json'
115
+ ], packageName);
116
+ addAgentsMdSearchDirs(toolFolder);
117
+ }
118
+ },
119
+ {
120
+ value: 'storybook',
121
+ label: 'Storybook - component development',
122
+ when: (templateName)=>templateName.startsWith('react') || templateName.startsWith('vue'),
123
+ action: ({ templateName, distFolder, addAgentsMdSearchDirs })=>{
124
+ const toolFolder = node_path.join(src_dirname, '..', 'template-storybook');
125
+ const subFolder = node_path.join(toolFolder, templateName);
126
+ copyFolder({
127
+ from: subFolder,
128
+ to: distFolder,
129
+ isMergePackageJson: true
130
+ });
131
+ addAgentsMdSearchDirs(toolFolder);
132
+ }
133
+ },
134
+ {
135
+ value: 'rstest',
136
+ label: 'Rstest - testing',
137
+ action: ({ templateName, distFolder, addAgentsMdSearchDirs })=>{
138
+ const rstestTemplate = mapTestingToolTemplate(templateName);
139
+ const toolFolder = node_path.join(src_dirname, '..', 'template-rstest');
140
+ const subFolder = node_path.join(toolFolder, rstestTemplate);
141
+ copyFolder({
142
+ from: subFolder,
143
+ to: distFolder,
144
+ isMergePackageJson: true
145
+ });
146
+ addAgentsMdSearchDirs(toolFolder);
147
+ }
148
+ },
149
+ {
150
+ value: 'vitest',
151
+ label: 'Vitest - testing',
152
+ action: ({ templateName, distFolder, addAgentsMdSearchDirs })=>{
153
+ const vitestTemplate = mapTestingToolTemplate(templateName);
154
+ const toolFolder = node_path.join(src_dirname, '..', 'template-vitest');
155
+ const subFolder = node_path.join(toolFolder, vitestTemplate);
156
+ copyFolder({
157
+ from: subFolder,
158
+ to: distFolder,
159
+ isMergePackageJson: true
160
+ });
161
+ addAgentsMdSearchDirs(toolFolder);
162
+ }
163
+ }
164
+ ]
347
165
  });
166
+ export { TEMPLATES, parseTemplateName };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-rslib",
3
- "version": "0.19.3",
3
+ "version": "0.19.4",
4
4
  "description": "Create a new Rslib project",
5
5
  "homepage": "https://rslib.rs",
6
6
  "repository": {
@@ -22,14 +22,14 @@
22
22
  "dist"
23
23
  ],
24
24
  "dependencies": {
25
- "create-rstack": "1.7.20"
25
+ "create-rstack": "1.7.21"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/fs-extra": "^11.0.4",
29
29
  "@types/node": "^24.10.9",
30
30
  "fs-extra": "^11.3.3",
31
- "rsbuild-plugin-publint": "^0.3.3",
32
- "rslib": "npm:@rslib/core@0.19.2",
31
+ "rsbuild-plugin-publint": "^0.3.4",
32
+ "rslib": "npm:@rslib/core@0.19.3",
33
33
  "tsx": "^4.21.0",
34
34
  "typescript": "^5.9.3",
35
35
  "@rslib/tsconfig": "0.0.1"
@@ -44,7 +44,6 @@
44
44
  "scripts": {
45
45
  "build": "rslib build",
46
46
  "dev": "rslib build --watch",
47
- "generate-templates": "pnpm tsx ./src/genTemplates.ts",
48
47
  "start": "node ./dist/index.js",
49
48
  "test": "rstest",
50
49
  "type-check": "tsc --noEmit"
@@ -15,9 +15,9 @@
15
15
  "dev": "rslib build --watch"
16
16
  },
17
17
  "devDependencies": {
18
- "@rsbuild/plugin-react": "^1.4.3",
18
+ "@rsbuild/plugin-react": "^1.4.4",
19
19
  "@rslib/core": "workspace:*",
20
- "react": "^19.2.3"
20
+ "react": "^19.2.4"
21
21
  },
22
22
  "peerDependencies": {
23
23
  "react": ">=16.9.0",
@@ -17,10 +17,10 @@
17
17
  "dev": "rslib build --watch"
18
18
  },
19
19
  "devDependencies": {
20
- "@rsbuild/plugin-react": "^1.4.3",
20
+ "@rsbuild/plugin-react": "^1.4.4",
21
21
  "@rslib/core": "workspace:*",
22
- "@types/react": "^19.2.8",
23
- "react": "^19.2.3",
22
+ "@types/react": "^19.2.10",
23
+ "react": "^19.2.4",
24
24
  "typescript": "^5.9.3"
25
25
  },
26
26
  "peerDependencies": {
@@ -1,10 +1,27 @@
1
1
  import './button.css';
2
2
 
3
- interface ButtonProps {
3
+ export interface ButtonProps {
4
+ /**
5
+ * Whether the button is primary
6
+ * @default false
7
+ */
4
8
  primary?: boolean;
9
+ /**
10
+ * Background color of the button
11
+ */
5
12
  backgroundColor?: string;
13
+ /**
14
+ * Size of Button
15
+ * @default 'medium'
16
+ */
6
17
  size?: 'small' | 'medium' | 'large';
18
+ /**
19
+ * Label of the button
20
+ */
7
21
  label: string;
22
+ /**
23
+ * Optional click handler
24
+ */
8
25
  onClick?: () => void;
9
26
  }
10
27
 
@@ -0,0 +1,10 @@
1
+ ## Docs
2
+
3
+ - Rspress: https://rspress.rs/llms.txt
4
+
5
+ ## Tools
6
+
7
+ ### Rspress
8
+
9
+ - Run `{{ packageManager }} run doc` to start the Rspress documentation dev server, which will also start Rslib in watch mode
10
+ - Run `{{ packageManager }} run doc:build` to build the documentation
@@ -0,0 +1,31 @@
1
+ # Button
2
+
3
+ ## Size
4
+
5
+ Buttons can be small, medium and large in size.
6
+
7
+ ```jsx preview
8
+ import React from 'react';
9
+ import { Button } from '{{ packageName }}';
10
+
11
+ export default () => {
12
+ return <Button size="medium" label="Click me"></Button>;
13
+ };
14
+ ```
15
+
16
+ ## Background color
17
+
18
+ The background color of the button can be set by yourself.
19
+
20
+ ```jsx preview
21
+ import React from 'react';
22
+ import { Button } from '{{ packageName }}';
23
+
24
+ export default () => {
25
+ return <Button backgroundColor="red" label="Red"></Button>;
26
+ };
27
+ ```
28
+
29
+ ## API
30
+
31
+ <API moduleName="Button" en />
@@ -0,0 +1 @@
1
+ ["index", "Button"]
@@ -0,0 +1,4 @@
1
+ ---
2
+ overview: true
3
+ title: Overview
4
+ ---
@@ -0,0 +1,15 @@
1
+ {
2
+ "scripts": {
3
+ "doc": "rspress dev",
4
+ "doc:build": "rspress build",
5
+ "doc:preview": "rspress preview"
6
+ },
7
+ "devDependencies": {
8
+ "@rspress/core": "^2.0.0",
9
+ "@rspress/plugin-api-docgen": "^2.0.0",
10
+ "@rspress/plugin-preview": "^2.0.0",
11
+ "@types/node": "^24.10.9",
12
+ "react-dom": "^19.2.4",
13
+ "rsbuild-plugin-workspace-dev": "^0.1.3"
14
+ }
15
+ }
@@ -0,0 +1,27 @@
1
+ import * as path from 'node:path';
2
+ import { defineConfig } from '@rspress/core';
3
+ import { pluginApiDocgen } from '@rspress/plugin-api-docgen';
4
+ import { pluginPreview } from '@rspress/plugin-preview';
5
+ import { pluginWorkspaceDev } from 'rsbuild-plugin-workspace-dev';
6
+
7
+ export default defineConfig({
8
+ root: path.join(__dirname, 'docs'),
9
+ title: 'Rslib Module Doc',
10
+ lang: 'en',
11
+ builderConfig: {
12
+ plugins: [
13
+ pluginWorkspaceDev({
14
+ startCurrent: true,
15
+ }),
16
+ ],
17
+ },
18
+ plugins: [
19
+ pluginApiDocgen({
20
+ entries: {
21
+ Button: './src/Button.tsx',
22
+ },
23
+ apiParseTool: 'react-docgen-typescript',
24
+ }),
25
+ pluginPreview(),
26
+ ],
27
+ });
@@ -8,7 +8,10 @@
8
8
  "isolatedModules": true,
9
9
  "resolveJsonModule": true,
10
10
  "moduleResolution": "bundler",
11
- "useDefineForClassFields": true
11
+ "useDefineForClassFields": true,
12
+ "paths": {
13
+ "{{ packageName }}": ["."]
14
+ }
12
15
  },
13
- "include": ["src"]
16
+ "include": ["src", "docs", "rspress.config.ts"]
14
17
  }
@@ -0,0 +1,10 @@
1
+ ## Docs
2
+
3
+ - Rstest: https://rstest.rs/llms.txt
4
+
5
+ ## Tools
6
+
7
+ ### Rstest
8
+
9
+ - Run `{{ packageManager }} run test` to run tests
10
+ - Run `{{ packageManager }} run test:watch` to run tests in watch mode
@@ -0,0 +1,10 @@
1
+ {
2
+ "scripts": {
3
+ "test": "rstest",
4
+ "test:watch": "rstest --watch"
5
+ },
6
+ "devDependencies": {
7
+ "@rstest/adapter-rslib": "^0.2.0",
8
+ "@rstest/core": "^0.8.1"
9
+ }
10
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "scripts": {
3
+ "test": "rstest",
4
+ "test:watch": "rstest --watch"
5
+ },
6
+ "devDependencies": {
7
+ "@rstest/adapter-rslib": "^0.2.0",
8
+ "@rstest/core": "^0.8.1"
9
+ }
10
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "scripts": {
3
+ "test": "rstest",
4
+ "test:watch": "rstest --watch"
5
+ },
6
+ "devDependencies": {
7
+ "@rstest/adapter-rslib": "^0.2.0",
8
+ "@rstest/core": "^0.8.1",
9
+ "@testing-library/jest-dom": "^6.9.1",
10
+ "@testing-library/react": "^16.3.2",
11
+ "happy-dom": "^20.4.0"
12
+ }
13
+ }