create-rstack 2.1.3 → 3.1.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 (272) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +43 -73
  3. package/bin.js +2 -0
  4. package/dist/index.js +195 -3312
  5. package/package.json +23 -41
  6. package/template-app-lit/package.json +23 -0
  7. package/template-app-lit/rstack.config.js +28 -0
  8. package/template-app-lit/src/index.css +6 -0
  9. package/template-app-lit/src/index.html +7 -0
  10. package/template-app-lit/src/index.js +4 -0
  11. package/template-app-lit/src/my-element.js +34 -0
  12. package/template-app-lit/tests/index.test.js +12 -0
  13. package/template-app-lit-ts/package.json +25 -0
  14. package/template-app-lit-ts/rstack.config.ts +27 -0
  15. package/template-app-lit-ts/src/index.css +6 -0
  16. package/template-app-lit-ts/src/index.html +7 -0
  17. package/template-app-lit-ts/src/index.ts +4 -0
  18. package/template-app-lit-ts/src/my-element.ts +34 -0
  19. package/template-app-lit-ts/tests/index.test.ts +12 -0
  20. package/template-app-lit-ts/tsconfig.json +23 -0
  21. package/template-app-preact/package.json +26 -0
  22. package/template-app-preact/rstack.config.js +29 -0
  23. package/template-app-preact/src/App.css +26 -0
  24. package/template-app-preact/src/App.jsx +12 -0
  25. package/template-app-preact/src/index.jsx +4 -0
  26. package/template-app-preact/tests/index.test.jsx +8 -0
  27. package/template-app-preact/tests/rstest.setup.js +4 -0
  28. package/template-app-preact-ts/package.json +28 -0
  29. package/template-app-preact-ts/rstack.config.ts +29 -0
  30. package/template-app-preact-ts/src/App.css +26 -0
  31. package/template-app-preact-ts/src/App.tsx +12 -0
  32. package/template-app-preact-ts/src/index.tsx +7 -0
  33. package/template-app-preact-ts/tests/index.test.tsx +8 -0
  34. package/template-app-preact-ts/tests/rstest.setup.ts +4 -0
  35. package/template-app-preact-ts/tests/tsconfig.json +7 -0
  36. package/template-app-preact-ts/tsconfig.json +28 -0
  37. package/template-app-react/package.json +28 -0
  38. package/template-app-react/rstack.config.js +29 -0
  39. package/template-app-react/src/App.css +26 -0
  40. package/template-app-react/src/App.jsx +12 -0
  41. package/template-app-react/src/index.jsx +10 -0
  42. package/template-app-react/tests/index.test.jsx +8 -0
  43. package/template-app-react/tests/rstest.setup.js +4 -0
  44. package/template-app-react-ts/package.json +32 -0
  45. package/template-app-react-ts/rstack.config.ts +29 -0
  46. package/template-app-react-ts/src/App.css +26 -0
  47. package/template-app-react-ts/src/App.tsx +12 -0
  48. package/template-app-react-ts/src/env.d.ts +9 -0
  49. package/template-app-react-ts/src/index.tsx +13 -0
  50. package/template-app-react-ts/tests/index.test.tsx +8 -0
  51. package/template-app-react-ts/tests/rstest.setup.ts +4 -0
  52. package/template-app-react-ts/tests/tsconfig.json +7 -0
  53. package/template-app-react-ts/tsconfig.json +23 -0
  54. package/template-app-solid/package.json +27 -0
  55. package/template-app-solid/rstack.config.js +31 -0
  56. package/template-app-solid/src/App.css +26 -0
  57. package/template-app-solid/src/App.jsx +12 -0
  58. package/template-app-solid/src/index.jsx +4 -0
  59. package/template-app-solid/tests/index.test.jsx +8 -0
  60. package/template-app-solid/tests/rstest.setup.js +4 -0
  61. package/template-app-solid-ts/package.json +29 -0
  62. package/template-app-solid-ts/rstack.config.ts +30 -0
  63. package/template-app-solid-ts/src/App.css +26 -0
  64. package/template-app-solid-ts/src/App.tsx +12 -0
  65. package/template-app-solid-ts/src/index.tsx +7 -0
  66. package/template-app-solid-ts/tests/index.test.tsx +8 -0
  67. package/template-app-solid-ts/tests/rstest.setup.ts +4 -0
  68. package/template-app-solid-ts/tests/tsconfig.json +7 -0
  69. package/template-app-solid-ts/tsconfig.json +24 -0
  70. package/template-app-svelte/package.json +27 -0
  71. package/template-app-svelte/pnpm-workspace.yaml +2 -0
  72. package/template-app-svelte/rstack.config.js +26 -0
  73. package/template-app-svelte/src/App.svelte +28 -0
  74. package/template-app-svelte/src/index.css +6 -0
  75. package/template-app-svelte/src/index.js +8 -0
  76. package/template-app-svelte/tests/index.test.js +8 -0
  77. package/template-app-svelte/tests/rstest.setup.js +4 -0
  78. package/template-app-svelte-ts/package.json +30 -0
  79. package/template-app-svelte-ts/pnpm-workspace.yaml +2 -0
  80. package/template-app-svelte-ts/rstack.config.ts +25 -0
  81. package/template-app-svelte-ts/src/App.svelte +37 -0
  82. package/template-app-svelte-ts/src/index.css +6 -0
  83. package/template-app-svelte-ts/src/index.ts +14 -0
  84. package/template-app-svelte-ts/tests/index.test.ts +11 -0
  85. package/template-app-svelte-ts/tests/rstest.setup.ts +4 -0
  86. package/template-app-svelte-ts/tests/tsconfig.json +7 -0
  87. package/template-app-svelte-ts/tsconfig.json +22 -0
  88. package/template-app-vanilla/package.json +22 -0
  89. package/template-app-vanilla/rstack.config.js +21 -0
  90. package/template-app-vanilla/src/index.css +26 -0
  91. package/template-app-vanilla/src/index.js +12 -0
  92. package/template-app-vanilla/tests/dom.test.js +12 -0
  93. package/template-app-vanilla/tests/rstest.setup.js +4 -0
  94. package/template-app-vanilla-ts/package.json +24 -0
  95. package/template-app-vanilla-ts/rstack.config.ts +20 -0
  96. package/template-app-vanilla-ts/src/index.css +26 -0
  97. package/template-app-vanilla-ts/src/index.ts +12 -0
  98. package/template-app-vanilla-ts/tests/dom.test.ts +12 -0
  99. package/template-app-vanilla-ts/tests/rstest.setup.ts +4 -0
  100. package/template-app-vanilla-ts/tests/tsconfig.json +7 -0
  101. package/template-app-vanilla-ts/tsconfig.json +22 -0
  102. package/template-app-vue/package.json +26 -0
  103. package/template-app-vue/rstack.config.js +25 -0
  104. package/template-app-vue/src/App.vue +28 -0
  105. package/template-app-vue/src/index.css +6 -0
  106. package/template-app-vue/src/index.js +5 -0
  107. package/template-app-vue/tests/index.test.js +8 -0
  108. package/template-app-vue/tests/rstest.setup.js +6 -0
  109. package/template-app-vue-ts/package.json +29 -0
  110. package/template-app-vue-ts/rstack.config.ts +24 -0
  111. package/template-app-vue-ts/src/App.vue +28 -0
  112. package/template-app-vue-ts/src/index.css +6 -0
  113. package/template-app-vue-ts/src/index.ts +5 -0
  114. package/template-app-vue-ts/tests/index.test.ts +8 -0
  115. package/template-app-vue-ts/tests/rstest.setup.ts +6 -0
  116. package/template-app-vue-ts/tests/tsconfig.json +7 -0
  117. package/template-app-vue-ts/tsconfig.json +24 -0
  118. package/template-common/AGENTS.md +7 -0
  119. package/template-common/README.md +25 -0
  120. package/template-common/gitignore +13 -0
  121. package/template-doc/README.md +23 -0
  122. package/template-doc/docs/_nav.json +16 -0
  123. package/template-doc/docs/api/_meta.json +1 -0
  124. package/template-doc/docs/api/commands.mdx +25 -0
  125. package/template-doc/docs/api/index.mdx +6 -0
  126. package/template-doc/docs/guide/_meta.json +7 -0
  127. package/template-doc/docs/guide/start/_meta.json +1 -0
  128. package/template-doc/docs/guide/start/introduction.md +5 -0
  129. package/template-doc/docs/index.md +39 -0
  130. package/template-doc/gitignore +14 -0
  131. package/template-doc/package.json +24 -0
  132. package/template-doc/rstack.config.ts +23 -0
  133. package/template-doc/tsconfig.json +26 -0
  134. package/template-doc-i18n/README.md +23 -0
  135. package/template-doc-i18n/docs/en/_nav.json +16 -0
  136. package/template-doc-i18n/docs/en/api/_meta.json +1 -0
  137. package/template-doc-i18n/docs/en/api/commands.mdx +25 -0
  138. package/template-doc-i18n/docs/en/api/index.mdx +6 -0
  139. package/template-doc-i18n/docs/en/guide/_meta.json +7 -0
  140. package/template-doc-i18n/docs/en/guide/start/_meta.json +1 -0
  141. package/template-doc-i18n/docs/en/guide/start/introduction.md +5 -0
  142. package/template-doc-i18n/docs/en/index.md +39 -0
  143. package/template-doc-i18n/docs/zh/_nav.json +16 -0
  144. package/template-doc-i18n/docs/zh/api/_meta.json +12 -0
  145. package/template-doc-i18n/docs/zh/api/commands.mdx +25 -0
  146. package/template-doc-i18n/docs/zh/api/index.mdx +6 -0
  147. package/template-doc-i18n/docs/zh/guide/_meta.json +7 -0
  148. package/template-doc-i18n/docs/zh/guide/start/_meta.json +7 -0
  149. package/template-doc-i18n/docs/zh/guide/start/introduction.md +5 -0
  150. package/template-doc-i18n/docs/zh/index.md +39 -0
  151. package/template-doc-i18n/gitignore +14 -0
  152. package/template-doc-i18n/package.json +24 -0
  153. package/template-doc-i18n/rstack.config.ts +39 -0
  154. package/template-doc-i18n/tsconfig.json +26 -0
  155. package/template-lib-node/README.md +24 -0
  156. package/template-lib-node/package.json +33 -0
  157. package/template-lib-node/rstack.config.js +21 -0
  158. package/template-lib-node/src/index.js +1 -0
  159. package/template-lib-node/tests/index.test.js +7 -0
  160. package/template-lib-node-ts/README.md +24 -0
  161. package/template-lib-node-ts/package.json +37 -0
  162. package/template-lib-node-ts/rstack.config.ts +21 -0
  163. package/template-lib-node-ts/src/index.ts +1 -0
  164. package/template-lib-node-ts/tests/index.test.ts +7 -0
  165. package/template-lib-node-ts/tsconfig.json +23 -0
  166. package/template-lib-react/README.md +24 -0
  167. package/template-lib-react/package.json +41 -0
  168. package/template-lib-react/rstack.config.js +38 -0
  169. package/template-lib-react/src/Button.jsx +21 -0
  170. package/template-lib-react/src/button.css +34 -0
  171. package/template-lib-react/src/index.jsx +1 -0
  172. package/template-lib-react/tests/index.test.jsx +11 -0
  173. package/template-lib-react/tests/rstest.setup.js +4 -0
  174. package/template-lib-react-ts/README.md +24 -0
  175. package/template-lib-react-ts/package.json +46 -0
  176. package/template-lib-react-ts/rstack.config.ts +39 -0
  177. package/template-lib-react-ts/src/Button.tsx +46 -0
  178. package/template-lib-react-ts/src/button.css +34 -0
  179. package/template-lib-react-ts/src/index.tsx +1 -0
  180. package/template-lib-react-ts/tests/index.test.tsx +11 -0
  181. package/template-lib-react-ts/tests/rstest.setup.ts +4 -0
  182. package/template-lib-react-ts/tests/tsconfig.json +8 -0
  183. package/template-lib-react-ts/tsconfig.json +24 -0
  184. package/template-lib-solid/README.md +24 -0
  185. package/template-lib-solid/package.json +39 -0
  186. package/template-lib-solid/rstack.config.js +86 -0
  187. package/template-lib-solid/src/Button.jsx +18 -0
  188. package/template-lib-solid/src/button.css +34 -0
  189. package/template-lib-solid/src/index.jsx +1 -0
  190. package/template-lib-solid/tests/index.test.jsx +11 -0
  191. package/template-lib-solid/tests/rstest.setup.js +4 -0
  192. package/template-lib-solid-ts/README.md +24 -0
  193. package/template-lib-solid-ts/package.json +43 -0
  194. package/template-lib-solid-ts/rstack.config.ts +86 -0
  195. package/template-lib-solid-ts/src/Button.tsx +43 -0
  196. package/template-lib-solid-ts/src/button.css +34 -0
  197. package/template-lib-solid-ts/src/index.tsx +2 -0
  198. package/template-lib-solid-ts/tests/index.test.tsx +11 -0
  199. package/template-lib-solid-ts/tests/rstest.setup.ts +4 -0
  200. package/template-lib-solid-ts/tests/tsconfig.json +8 -0
  201. package/template-lib-solid-ts/tsconfig.json +25 -0
  202. package/template-lib-svelte/README.md +24 -0
  203. package/template-lib-svelte/package.json +36 -0
  204. package/template-lib-svelte/pnpm-workspace.yaml +2 -0
  205. package/template-lib-svelte/rstack.config.js +35 -0
  206. package/template-lib-svelte/src/Button.svelte +24 -0
  207. package/template-lib-svelte/src/button.css +34 -0
  208. package/template-lib-svelte/src/index.js +1 -0
  209. package/template-lib-svelte/tests/index.test.js +19 -0
  210. package/template-lib-svelte-ts/README.md +24 -0
  211. package/template-lib-svelte-ts/package.json +42 -0
  212. package/template-lib-svelte-ts/pnpm-workspace.yaml +2 -0
  213. package/template-lib-svelte-ts/rstack.config.ts +35 -0
  214. package/template-lib-svelte-ts/scripts/rslib-plugin-svelte-dts.ts +59 -0
  215. package/template-lib-svelte-ts/src/Button.svelte +34 -0
  216. package/template-lib-svelte-ts/src/button.css +34 -0
  217. package/template-lib-svelte-ts/src/index.ts +1 -0
  218. package/template-lib-svelte-ts/tests/index.test.ts +19 -0
  219. package/template-lib-svelte-ts/tests/tsconfig.json +7 -0
  220. package/template-lib-svelte-ts/tsconfig.json +25 -0
  221. package/template-lib-vue/README.md +24 -0
  222. package/template-lib-vue/package.json +37 -0
  223. package/template-lib-vue/rstack.config.js +34 -0
  224. package/template-lib-vue/src/Button.vue +43 -0
  225. package/template-lib-vue/src/button.css +34 -0
  226. package/template-lib-vue/src/index.js +1 -0
  227. package/template-lib-vue/tests/index.test.js +17 -0
  228. package/template-lib-vue/tests/rstest.setup.js +6 -0
  229. package/template-lib-vue-ts/README.md +24 -0
  230. package/template-lib-vue-ts/package.json +42 -0
  231. package/template-lib-vue-ts/rstack.config.ts +33 -0
  232. package/template-lib-vue-ts/src/Button.vue +35 -0
  233. package/template-lib-vue-ts/src/button.css +34 -0
  234. package/template-lib-vue-ts/src/index.ts +1 -0
  235. package/template-lib-vue-ts/tests/index.test.ts +17 -0
  236. package/template-lib-vue-ts/tests/rstest.setup.ts +6 -0
  237. package/template-lib-vue-ts/tests/tsconfig.json +8 -0
  238. package/template-lib-vue-ts/tsconfig.json +27 -0
  239. package/dist/index.d.ts +0 -356
  240. package/template-biome/AGENTS.md +0 -6
  241. package/template-biome/biome.json.template +0 -34
  242. package/template-biome/package.json +0 -12
  243. package/template-eslint/AGENTS.md +0 -5
  244. package/template-eslint/react-js/eslint.config.mjs +0 -23
  245. package/template-eslint/react-js/package.json +0 -15
  246. package/template-eslint/react-ts/eslint.config.mjs +0 -22
  247. package/template-eslint/react-ts/package.json +0 -16
  248. package/template-eslint/svelte-js/eslint.config.mjs +0 -20
  249. package/template-eslint/svelte-js/package.json +0 -14
  250. package/template-eslint/svelte-ts/eslint.config.mjs +0 -28
  251. package/template-eslint/svelte-ts/package.json +0 -16
  252. package/template-eslint/vanilla-js/eslint.config.mjs +0 -8
  253. package/template-eslint/vanilla-js/package.json +0 -13
  254. package/template-eslint/vanilla-ts/eslint.config.mjs +0 -10
  255. package/template-eslint/vanilla-ts/package.json +0 -14
  256. package/template-eslint/vue-js/eslint.config.mjs +0 -15
  257. package/template-eslint/vue-js/package.json +0 -14
  258. package/template-eslint/vue-ts/eslint.config.mjs +0 -23
  259. package/template-eslint/vue-ts/package.json +0 -15
  260. package/template-prettier/.prettierignore +0 -4
  261. package/template-prettier/.prettierrc +0 -3
  262. package/template-prettier/AGENTS.md +0 -5
  263. package/template-prettier/package.json +0 -11
  264. package/template-rslint/AGENTS.md +0 -9
  265. package/template-rslint/react-js/package.json +0 -11
  266. package/template-rslint/react-js/rslint.config.ts +0 -7
  267. package/template-rslint/react-ts/package.json +0 -11
  268. package/template-rslint/react-ts/rslint.config.ts +0 -14
  269. package/template-rslint/vanilla-js/package.json +0 -11
  270. package/template-rslint/vanilla-js/rslint.config.ts +0 -3
  271. package/template-rslint/vanilla-ts/package.json +0 -11
  272. package/template-rslint/vanilla-ts/rslint.config.ts +0 -3
@@ -0,0 +1,28 @@
1
+ <template>
2
+ <div class="content">
3
+ <h1>Rstack with Vue</h1>
4
+ <p>Start building amazing things with Rstack.</p>
5
+ </div>
6
+ </template>
7
+
8
+ <style scoped>
9
+ .content {
10
+ display: flex;
11
+ min-height: 100vh;
12
+ line-height: 1.1;
13
+ text-align: center;
14
+ flex-direction: column;
15
+ justify-content: center;
16
+ }
17
+
18
+ .content h1 {
19
+ font-size: 3.6rem;
20
+ font-weight: 700;
21
+ }
22
+
23
+ .content p {
24
+ font-size: 1.2rem;
25
+ font-weight: 400;
26
+ opacity: 0.5;
27
+ }
28
+ </style>
@@ -0,0 +1,6 @@
1
+ body {
2
+ margin: 0;
3
+ color: #fff;
4
+ font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
5
+ background-image: linear-gradient(to bottom, #020917, #101725);
6
+ }
@@ -0,0 +1,5 @@
1
+ import { createApp } from 'vue';
2
+ import App from './App.vue';
3
+ import './index.css';
4
+
5
+ createApp(App).mount('#root');
@@ -0,0 +1,8 @@
1
+ import { expect, test } from 'rstack/test';
2
+ import { mount } from '@vue/test-utils';
3
+ import App from '../src/App.vue';
4
+
5
+ test('renders the main page', () => {
6
+ const wrapper = mount(App);
7
+ expect(wrapper.element).toHaveTextContent('Rstack with Vue');
8
+ });
@@ -0,0 +1,6 @@
1
+ import { afterEach, expect } from 'rstack/test';
2
+ import * as jestDomMatchers from '@testing-library/jest-dom/matchers';
3
+ import { enableAutoUnmount } from '@vue/test-utils';
4
+
5
+ expect.extend(jestDomMatchers);
6
+ enableAutoUnmount(afterEach);
@@ -0,0 +1,7 @@
1
+ {
2
+ "extends": "../tsconfig.json",
3
+ "compilerOptions": {
4
+ "types": ["rstack/types", "node", "@testing-library/jest-dom"]
5
+ },
6
+ "include": ["./"]
7
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "compilerOptions": {
3
+ "lib": ["DOM", "ES2020"],
4
+ "jsx": "preserve",
5
+ "target": "ES2020",
6
+ "noEmit": true,
7
+ "skipLibCheck": true,
8
+ "types": ["rstack/types", "node"],
9
+ "jsxImportSource": "vue",
10
+ "useDefineForClassFields": true,
11
+
12
+ /* modules */
13
+ "moduleDetection": "force",
14
+ "moduleResolution": "bundler",
15
+ "verbatimModuleSyntax": true,
16
+ "resolveJsonModule": true,
17
+ "allowImportingTsExtensions": true,
18
+
19
+ /* type checking */
20
+ "noUnusedLocals": true,
21
+ "noUnusedParameters": true
22
+ },
23
+ "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"]
24
+ }
@@ -0,0 +1,7 @@
1
+ # AGENTS.md
2
+
3
+ This project uses Rstack CLI as its JavaScript toolchain.
4
+
5
+ - Before working with `rs` commands, `rstack.config.*` files, or imports from `rstack`, start with `node_modules/rstack/docs/llms.txt`, then read only the linked pages relevant to the task.
6
+ - For command details, use `rs -h` or `rs <command> -h`.
7
+ - If the local documentation is unavailable, use https://rstack.rs/llms.txt and `rs <command> -h`.
@@ -0,0 +1,25 @@
1
+ # Rstack project
2
+
3
+ ## Setup
4
+
5
+ Install the dependencies:
6
+
7
+ ```bash
8
+ {{ packageManager }} install
9
+ ```
10
+
11
+ ## Scripts
12
+
13
+ - `{{ packageManager }} run build`: Build the app for production.
14
+ - `{{ packageManager }} run check`: Run static checks, including lint and format.
15
+ - `{{ packageManager }} run dev`: Run the app dev server.
16
+ - `{{ packageManager }} run format`: Format code.
17
+ - `{{ packageManager }} run lint`: Lint code.
18
+ - `{{ packageManager }} run preview`: Preview the app production build.
19
+ - `{{ packageManager }} run test`: Run tests.
20
+ - `{{ packageManager }} run test:watch`: Run tests in watch mode.
21
+
22
+ ## Learn more
23
+
24
+ - [Rstack documentation](https://rstack.rs)
25
+ - [Rstack GitHub repository](https://github.com/rstackjs/rstack-cli)
@@ -0,0 +1,13 @@
1
+ # Local
2
+ .DS_Store
3
+ *.local
4
+ *.log*
5
+
6
+ # Dist
7
+ node_modules
8
+ dist/
9
+
10
+ # IDE
11
+ .vscode/*
12
+ !.vscode/extensions.json
13
+ .idea
@@ -0,0 +1,23 @@
1
+ # Rstack documentation site
2
+
3
+ ## Setup
4
+
5
+ Install the dependencies:
6
+
7
+ ```bash
8
+ {{ packageManager }} install
9
+ ```
10
+
11
+ ## Scripts
12
+
13
+ - `{{ packageManager }} run build`: Build the documentation site for production.
14
+ - `{{ packageManager }} run check`: Run static checks, including lint and format.
15
+ - `{{ packageManager }} run dev`: Start the documentation dev server.
16
+ - `{{ packageManager }} run format`: Format code.
17
+ - `{{ packageManager }} run lint`: Lint code.
18
+ - `{{ packageManager }} run preview`: Preview the production build locally.
19
+
20
+ ## Learn more
21
+
22
+ - [Rstack documentation](https://rstack.rs)
23
+ - [Rspress documentation](https://rspress.rs)
@@ -0,0 +1,16 @@
1
+ [
2
+ {
3
+ "text": "Guide",
4
+ "link": "/guide/start/introduction",
5
+ "activeMatch": "/guide/"
6
+ },
7
+ {
8
+ "text": "API",
9
+ "link": "/api/",
10
+ "activeMatch": "/api/"
11
+ },
12
+ {
13
+ "text": "Rspress",
14
+ "link": "https://rspress.rs/"
15
+ }
16
+ ]
@@ -0,0 +1 @@
1
+ ["index", "commands"]
@@ -0,0 +1,25 @@
1
+ # Commands
2
+
3
+ ## dev
4
+
5
+ Start the local development server:
6
+
7
+ ```bash
8
+ rs doc
9
+ ```
10
+
11
+ ## build
12
+
13
+ Build the documentation site for production:
14
+
15
+ ```bash
16
+ rs doc build
17
+ ```
18
+
19
+ ## preview
20
+
21
+ Preview the production build locally:
22
+
23
+ ```bash
24
+ rs doc preview
25
+ ```
@@ -0,0 +1,6 @@
1
+ ---
2
+ title: API Overview
3
+ overview: true
4
+ ---
5
+
6
+ This is an API Overview page which outlines all the available APIs.
@@ -0,0 +1,7 @@
1
+ [
2
+ {
3
+ "type": "dir-section-header",
4
+ "name": "start",
5
+ "label": "Getting Started"
6
+ }
7
+ ]
@@ -0,0 +1 @@
1
+ ["introduction"]
@@ -0,0 +1,5 @@
1
+ # Introduction
2
+
3
+ Rspress is a fast static site generator based on [Rsbuild](https://rsbuild.rs/). It supports Markdown and MDX and includes a default documentation theme.
4
+
5
+ Learn more in the [Rspress documentation](https://rspress.rs/).
@@ -0,0 +1,39 @@
1
+ ---
2
+ pageType: home
3
+
4
+ hero:
5
+ name: My Site
6
+ text: A cool website!
7
+ tagline: This is the tagline
8
+ actions:
9
+ - theme: brand
10
+ text: Quick Start
11
+ link: /guide/start/introduction
12
+ - theme: alt
13
+ text: GitHub
14
+ link: https://github.com/rstackjs/rstack-cli
15
+ image:
16
+ src: https://assets.rspack.rs/rspress/rspress-logo.svg
17
+ alt: Logo
18
+ features:
19
+ - title: Blazing fast build speed
20
+ details: The core compilation module is based on the Rust front-end toolchain, providing a more ultimate development experience.
21
+ icon: 🏃🏻‍♀️
22
+ link: /guide/start/introduction
23
+ - title: Built-in full-text search
24
+ details: Automatically generates a full-text search index for you during construction, providing out-of-the-box full-text search capabilities.
25
+ icon: 🎨
26
+ link: https://rspress.rs/guide/advanced/custom-search
27
+ - title: AI-friendly
28
+ details: Generate llms.txt and Markdown files compliant with the llms.txt specification through SSG-MD, making it easier for large language models to understand and use your documentation.
29
+ icon: 🤖
30
+ link: https://rspress.rs/guide/basic/ssg-md
31
+ - title: Static site generation
32
+ details: In production, it automatically builds into static HTML files, which can be easily deployed anywhere.
33
+ icon: 🌈
34
+ link: https://rspress.rs/guide/basic/ssg
35
+ - title: Providing multiple custom capabilities
36
+ details: Through its extension mechanism, you can easily extend theme UI and build process.
37
+ icon: 🔥
38
+ link: https://rspress.rs/guide/basic/custom-theme
39
+ ---
@@ -0,0 +1,14 @@
1
+ # Local
2
+ .DS_Store
3
+ *.local
4
+ *.log*
5
+
6
+ # Dist
7
+ node_modules
8
+ dist/
9
+ doc_build/
10
+
11
+ # IDE
12
+ .vscode/*
13
+ !.vscode/extensions.json
14
+ .idea
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "rstack-doc",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "build": "rs doc build",
8
+ "check": "rs check --type-check",
9
+ "dev": "rs doc",
10
+ "format": "rs fmt",
11
+ "lint": "rs lint",
12
+ "preview": "rs doc preview"
13
+ },
14
+ "devDependencies": {
15
+ "@rspress/core": "^2.0.19",
16
+ "@types/node": "^24.13.3",
17
+ "@types/react": "^19.2.18",
18
+ "@types/react-dom": "^19.2.4",
19
+ "react": "^19.2.8",
20
+ "react-dom": "^19.2.8",
21
+ "rstack": "^0.5.0",
22
+ "typescript": "^7.0.2"
23
+ }
24
+ }
@@ -0,0 +1,23 @@
1
+ // Rstack configuration guide: https://rstack.rs/config
2
+ import path from 'node:path';
3
+ import { define } from 'rstack';
4
+
5
+ define.doc({
6
+ root: path.join(import.meta.dirname, 'docs'),
7
+ title: 'My Site',
8
+ });
9
+
10
+ define.lint(async () => {
11
+ const { js, ts, reactPlugin, reactHooksPlugin } = await import('rstack/lint');
12
+
13
+ return [
14
+ js.configs.recommended,
15
+ ts.configs.recommended,
16
+ reactPlugin.configs.recommended,
17
+ reactHooksPlugin.configs.recommended,
18
+ ];
19
+ });
20
+
21
+ define.fmt({
22
+ singleQuote: true,
23
+ });
@@ -0,0 +1,26 @@
1
+ {
2
+ "compilerOptions": {
3
+ "lib": ["DOM", "ES2020"],
4
+ "jsx": "react-jsx",
5
+ "target": "ES2020",
6
+ "noEmit": true,
7
+ "skipLibCheck": true,
8
+ "types": ["rstack/types", "node"],
9
+ "useDefineForClassFields": true,
10
+
11
+ /* modules */
12
+ "moduleDetection": "force",
13
+ "moduleResolution": "bundler",
14
+ "verbatimModuleSyntax": true,
15
+ "resolveJsonModule": true,
16
+ "allowImportingTsExtensions": true,
17
+
18
+ /* type checking */
19
+ "noUnusedLocals": true,
20
+ "noUnusedParameters": true
21
+ },
22
+ "include": ["docs", "rstack.config.ts"],
23
+ "mdx": {
24
+ "checkMdx": true
25
+ }
26
+ }
@@ -0,0 +1,23 @@
1
+ # Rstack multilingual documentation site
2
+
3
+ ## Setup
4
+
5
+ Install the dependencies:
6
+
7
+ ```bash
8
+ {{ packageManager }} install
9
+ ```
10
+
11
+ ## Scripts
12
+
13
+ - `{{ packageManager }} run build`: Build the documentation site for production.
14
+ - `{{ packageManager }} run check`: Run static checks, including lint and format.
15
+ - `{{ packageManager }} run dev`: Start the documentation dev server.
16
+ - `{{ packageManager }} run format`: Format code.
17
+ - `{{ packageManager }} run lint`: Lint code.
18
+ - `{{ packageManager }} run preview`: Preview the production build locally.
19
+
20
+ ## Learn more
21
+
22
+ - [Rstack documentation](https://rstack.rs)
23
+ - [Rspress documentation](https://rspress.rs)
@@ -0,0 +1,16 @@
1
+ [
2
+ {
3
+ "text": "Guide",
4
+ "link": "/guide/start/introduction",
5
+ "activeMatch": "/guide/"
6
+ },
7
+ {
8
+ "text": "API",
9
+ "link": "/api/",
10
+ "activeMatch": "/api/"
11
+ },
12
+ {
13
+ "text": "Rspress",
14
+ "link": "https://rspress.rs/"
15
+ }
16
+ ]
@@ -0,0 +1 @@
1
+ ["index", "commands"]
@@ -0,0 +1,25 @@
1
+ # Commands
2
+
3
+ ## dev
4
+
5
+ Start the local development server:
6
+
7
+ ```bash
8
+ rs doc
9
+ ```
10
+
11
+ ## build
12
+
13
+ Build the documentation site for production:
14
+
15
+ ```bash
16
+ rs doc build
17
+ ```
18
+
19
+ ## preview
20
+
21
+ Preview the production build locally:
22
+
23
+ ```bash
24
+ rs doc preview
25
+ ```
@@ -0,0 +1,6 @@
1
+ ---
2
+ title: API Overview
3
+ overview: true
4
+ ---
5
+
6
+ This is an API Overview page which outlines all the available APIs.
@@ -0,0 +1,7 @@
1
+ [
2
+ {
3
+ "type": "dir-section-header",
4
+ "name": "start",
5
+ "label": "Getting Started"
6
+ }
7
+ ]
@@ -0,0 +1 @@
1
+ ["introduction"]
@@ -0,0 +1,5 @@
1
+ # Introduction
2
+
3
+ Rspress is a fast static site generator based on [Rsbuild](https://rsbuild.rs/). It supports Markdown and MDX and includes a default documentation theme.
4
+
5
+ Learn more in the [Rspress documentation](https://rspress.rs/).
@@ -0,0 +1,39 @@
1
+ ---
2
+ pageType: home
3
+
4
+ hero:
5
+ name: My Site
6
+ text: A cool website!
7
+ tagline: This is the tagline
8
+ actions:
9
+ - theme: brand
10
+ text: Quick Start
11
+ link: /guide/start/introduction
12
+ - theme: alt
13
+ text: GitHub
14
+ link: https://github.com/rstackjs/rstack-cli
15
+ image:
16
+ src: https://assets.rspack.rs/rspress/rspress-logo.svg
17
+ alt: Logo
18
+ features:
19
+ - title: Blazing fast build speed
20
+ details: The core compilation module is based on the Rust front-end toolchain, providing a more ultimate development experience.
21
+ icon: 🏃🏻‍♀️
22
+ link: /guide/start/introduction
23
+ - title: Built-in full-text search
24
+ details: Automatically generates a full-text search index for you during construction, providing out-of-the-box full-text search capabilities.
25
+ icon: 🎨
26
+ link: https://rspress.rs/guide/advanced/custom-search
27
+ - title: AI-friendly
28
+ details: Generate llms.txt and Markdown files compliant with the llms.txt specification through SSG-MD, making it easier for large language models to understand and use your documentation.
29
+ icon: 🤖
30
+ link: https://rspress.rs/guide/basic/ssg-md
31
+ - title: Static site generation
32
+ details: In production, it automatically builds into static HTML files, which can be easily deployed anywhere.
33
+ icon: 🌈
34
+ link: https://rspress.rs/guide/basic/ssg
35
+ - title: Providing multiple custom capabilities
36
+ details: Through its extension mechanism, you can easily extend theme UI and build process.
37
+ icon: 🔥
38
+ link: https://rspress.rs/guide/basic/custom-theme
39
+ ---
@@ -0,0 +1,16 @@
1
+ [
2
+ {
3
+ "text": "指南",
4
+ "link": "/guide/start/introduction",
5
+ "activeMatch": "/guide/"
6
+ },
7
+ {
8
+ "text": "API",
9
+ "link": "/api/",
10
+ "activeMatch": "/api/"
11
+ },
12
+ {
13
+ "text": "Rspress",
14
+ "link": "https://rspress.rs/zh/"
15
+ }
16
+ ]
@@ -0,0 +1,12 @@
1
+ [
2
+ {
3
+ "type": "file",
4
+ "name": "index",
5
+ "label": "API 概览"
6
+ },
7
+ {
8
+ "type": "file",
9
+ "name": "commands",
10
+ "label": "命令"
11
+ }
12
+ ]
@@ -0,0 +1,25 @@
1
+ # 命令
2
+
3
+ ## dev
4
+
5
+ 启动本地开发服务器:
6
+
7
+ ```bash
8
+ rs doc
9
+ ```
10
+
11
+ ## build
12
+
13
+ 构建用于生产环境的文档站点:
14
+
15
+ ```bash
16
+ rs doc build
17
+ ```
18
+
19
+ ## preview
20
+
21
+ 在本地预览生产构建:
22
+
23
+ ```bash
24
+ rs doc preview
25
+ ```
@@ -0,0 +1,6 @@
1
+ ---
2
+ title: API 概览
3
+ overview: true
4
+ ---
5
+
6
+ 这是一个 API 概览页面,用于列出所有可用 API。
@@ -0,0 +1,7 @@
1
+ [
2
+ {
3
+ "type": "dir-section-header",
4
+ "name": "start",
5
+ "label": "快速开始"
6
+ }
7
+ ]
@@ -0,0 +1,7 @@
1
+ [
2
+ {
3
+ "type": "file",
4
+ "name": "introduction",
5
+ "label": "介绍"
6
+ }
7
+ ]
@@ -0,0 +1,5 @@
1
+ # 介绍
2
+
3
+ Rspress 是一个基于 [Rsbuild](https://rsbuild.rs/) 的快速静态站点生成器。它支持 Markdown 和 MDX,并内置默认文档主题。
4
+
5
+ 前往 [Rspress 文档](https://rspress.rs/zh/)了解更多。
@@ -0,0 +1,39 @@
1
+ ---
2
+ pageType: home
3
+
4
+ hero:
5
+ name: 我的站点
6
+ text: 一个很酷的网站!
7
+ tagline: 这是网站的副标题
8
+ actions:
9
+ - theme: brand
10
+ text: 快速开始
11
+ link: /zh/guide/start/introduction
12
+ - theme: alt
13
+ text: GitHub
14
+ link: https://github.com/rstackjs/rstack-cli
15
+ image:
16
+ src: https://assets.rspack.rs/rspress/rspress-logo.svg
17
+ alt: Logo
18
+ features:
19
+ - title: 极速构建
20
+ details: 核心编译模块基于 Rust 前端工具链,提供更极致的开发体验。
21
+ icon: 🏃🏻‍♀️
22
+ link: /zh/guide/start/introduction
23
+ - title: 内置全文搜索
24
+ details: 构建时自动生成全文搜索索引,提供开箱即用的全文搜索能力。
25
+ icon: 🎨
26
+ link: https://rspress.rs/zh/guide/advanced/custom-search
27
+ - title: AI 友好
28
+ details: 通过 SSG-MD 生成符合 llms.txt 规范的 llms.txt 和 Markdown 文件,让大语言模型更容易理解和使用你的文档。
29
+ icon: 🤖
30
+ link: https://rspress.rs/zh/guide/basic/ssg-md
31
+ - title: 静态站点生成
32
+ details: 在生产环境中自动构建为静态 HTML 文件,可以轻松部署到任意位置。
33
+ icon: 🌈
34
+ link: https://rspress.rs/zh/guide/basic/ssg
35
+ - title: 提供多种自定义能力
36
+ details: 通过扩展机制,你可以轻松扩展主题 UI 和构建流程。
37
+ icon: 🔥
38
+ link: https://rspress.rs/zh/guide/basic/custom-theme
39
+ ---
@@ -0,0 +1,14 @@
1
+ # Local
2
+ .DS_Store
3
+ *.local
4
+ *.log*
5
+
6
+ # Dist
7
+ node_modules
8
+ dist/
9
+ doc_build/
10
+
11
+ # IDE
12
+ .vscode/*
13
+ !.vscode/extensions.json
14
+ .idea