create-rstack 3.4.3 → 3.4.5

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 (78) hide show
  1. package/README.md +2 -0
  2. package/dist/index.js +18 -3
  3. package/package.json +4 -4
  4. package/template-app-lit/package.json +2 -2
  5. package/template-app-lit-ts/package.json +3 -3
  6. package/template-app-preact/package.json +3 -3
  7. package/template-app-preact-ts/package.json +4 -4
  8. package/template-app-react/package.json +2 -2
  9. package/template-app-react-ts/package.json +3 -3
  10. package/template-app-solid/package.json +2 -2
  11. package/template-app-solid-ts/package.json +3 -3
  12. package/template-app-svelte/package.json +2 -2
  13. package/template-app-svelte-ts/package.json +3 -3
  14. package/template-app-vanilla/package.json +2 -2
  15. package/template-app-vanilla-ts/package.json +3 -3
  16. package/template-app-vue/package.json +3 -3
  17. package/template-app-vue-ts/package.json +5 -5
  18. package/template-doc/package.json +2 -2
  19. package/template-doc-i18n/package.json +2 -2
  20. package/template-lib-node/package.json +2 -2
  21. package/template-lib-node-ts/package.json +3 -3
  22. package/template-lib-react/package.json +2 -2
  23. package/template-lib-react-ts/package.json +3 -3
  24. package/template-lib-solid/package.json +2 -2
  25. package/template-lib-solid-ts/package.json +3 -3
  26. package/template-lib-svelte/package.json +2 -2
  27. package/template-lib-svelte-ts/package.json +3 -3
  28. package/template-lib-vue/package.json +3 -3
  29. package/template-lib-vue-ts/package.json +5 -5
  30. package/template-nx/.env +2 -0
  31. package/template-nx/README.md +37 -0
  32. package/template-nx/apps/web/package.json +26 -0
  33. package/template-nx/apps/web/rstack.config.ts +13 -0
  34. package/template-nx/apps/web/src/App.tsx +17 -0
  35. package/template-nx/apps/web/src/index.css +27 -0
  36. package/template-nx/apps/web/src/index.tsx +13 -0
  37. package/template-nx/apps/web/tests/app.test.tsx +11 -0
  38. package/template-nx/apps/web/tests/rstest.setup.ts +4 -0
  39. package/template-nx/apps/web/tests/tsconfig.json +7 -0
  40. package/template-nx/apps/web/tsconfig.json +4 -0
  41. package/template-nx/gitignore +17 -0
  42. package/template-nx/nx.json +33 -0
  43. package/template-nx/package.json +20 -0
  44. package/template-nx/packages/ui/package.json +39 -0
  45. package/template-nx/packages/ui/rstack.config.ts +20 -0
  46. package/template-nx/packages/ui/src/button.tsx +8 -0
  47. package/template-nx/packages/ui/tests/button.test.tsx +18 -0
  48. package/template-nx/packages/ui/tests/rstest.setup.ts +4 -0
  49. package/template-nx/packages/ui/tests/tsconfig.json +8 -0
  50. package/template-nx/packages/ui/tsconfig.json +7 -0
  51. package/template-nx/pnpm-workspace.yaml +6 -0
  52. package/template-nx/rstack.config.ts +29 -0
  53. package/template-nx/tsconfig.base.json +22 -0
  54. package/template-pnpm/README.md +33 -0
  55. package/template-pnpm/apps/web/package.json +26 -0
  56. package/template-pnpm/apps/web/rstack.config.ts +13 -0
  57. package/template-pnpm/apps/web/src/App.tsx +17 -0
  58. package/template-pnpm/apps/web/src/index.css +27 -0
  59. package/template-pnpm/apps/web/src/index.tsx +13 -0
  60. package/template-pnpm/apps/web/tests/app.test.tsx +11 -0
  61. package/template-pnpm/apps/web/tests/rstest.setup.ts +4 -0
  62. package/template-pnpm/apps/web/tests/tsconfig.json +7 -0
  63. package/template-pnpm/apps/web/tsconfig.json +4 -0
  64. package/template-pnpm/gitignore +13 -0
  65. package/template-pnpm/package.json +19 -0
  66. package/template-pnpm/packages/ui/package.json +30 -0
  67. package/template-pnpm/packages/ui/rstack.config.ts +20 -0
  68. package/template-pnpm/packages/ui/src/button.tsx +8 -0
  69. package/template-pnpm/packages/ui/tests/button.test.tsx +18 -0
  70. package/template-pnpm/packages/ui/tests/rstest.setup.ts +4 -0
  71. package/template-pnpm/packages/ui/tests/tsconfig.json +8 -0
  72. package/template-pnpm/packages/ui/tsconfig.json +7 -0
  73. package/template-pnpm/pnpm-workspace.yaml +3 -0
  74. package/template-pnpm/rstack.config.ts +29 -0
  75. package/template-pnpm/tsconfig.base.json +22 -0
  76. package/template-turborepo/apps/web/package.json +1 -1
  77. package/template-turborepo/package.json +4 -4
  78. package/template-turborepo/packages/ui/package.json +1 -1
package/README.md CHANGED
@@ -50,7 +50,9 @@ npx create-rstack --dir my-project --template app-vanilla-ts --no-git
50
50
  - `lib-solid-ts` - TypeScript Solid library
51
51
  - `doc` - Basic documentation site
52
52
  - `doc-i18n` - Multilingual documentation site
53
+ - `pnpm` - pnpm workspace
53
54
  - `turborepo` - Turborepo
55
+ - `nx` - Nx
54
56
 
55
57
  ## Documentation
56
58
 
package/dist/index.js CHANGED
@@ -29,7 +29,9 @@ const templateNames = [
29
29
  'lib-solid-ts',
30
30
  'doc',
31
31
  'doc-i18n',
32
- 'turborepo'
32
+ 'pnpm',
33
+ 'turborepo',
34
+ 'nx'
33
35
  ];
34
36
  const resolveTemplateName = (template)=>{
35
37
  if (!templateNames.includes(template)) throw new Error(`Invalid input: template "${template}" not found.`);
@@ -37,7 +39,7 @@ const resolveTemplateName = (template)=>{
37
39
  };
38
40
  const getTemplateName = async ({ template })=>{
39
41
  if ('string' == typeof template) {
40
- if (/^(?:app|lib|doc|turborepo)(?:-|$)/u.test(template)) return resolveTemplateName(template);
42
+ if (/^(?:app|lib|doc|pnpm|turborepo|nx)(?:-|$)/u.test(template)) return resolveTemplateName(template);
41
43
  return template;
42
44
  }
43
45
  const projectType = checkCancel(await create_toolkit_select({
@@ -65,10 +67,19 @@ const getTemplateName = async ({ template })=>{
65
67
  const monorepoType = checkCancel(await create_toolkit_select({
66
68
  message: 'Select monorepo tool',
67
69
  options: [
70
+ {
71
+ value: 'pnpm',
72
+ label: 'pnpm workspace'
73
+ },
68
74
  {
69
75
  value: 'turborepo',
70
76
  label: 'Turborepo',
71
77
  hint: 'pnpm'
78
+ },
79
+ {
80
+ value: 'nx',
81
+ label: 'Nx',
82
+ hint: 'pnpm'
72
83
  }
73
84
  ]
74
85
  }));
@@ -226,6 +237,10 @@ await create({
226
237
  templates: templateNames,
227
238
  builtinTools: [],
228
239
  getTemplateName: getTemplateName,
229
- getPackageManager: ({ templateName })=>'turborepo' === templateName ? 'pnpm' : void 0,
240
+ getPackageManager: ({ templateName })=>[
241
+ 'pnpm',
242
+ 'turborepo',
243
+ 'nx'
244
+ ].includes(templateName) ? 'pnpm' : void 0,
230
245
  onGitResolved: injectStagedSetup
231
246
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-rstack",
3
- "version": "3.4.3",
3
+ "version": "3.4.5",
4
4
  "description": "Create a new Rstack project",
5
5
  "homepage": "https://rstack.rs",
6
6
  "bugs": {
@@ -32,12 +32,12 @@
32
32
  "@rstackjs/create-toolkit": "2.2.7"
33
33
  },
34
34
  "devDependencies": {
35
- "@types/node": "^26.6.4",
36
- "rstack": "0.8.3",
35
+ "@types/node": "^26.6.5",
36
+ "rstack": "0.8.5",
37
37
  "typescript": "^7.0.2"
38
38
  },
39
39
  "engines": {
40
- "node": ">=22.12.0"
40
+ "node": "^20.19.0 || >=22.12.0"
41
41
  },
42
42
  "publishConfig": {
43
43
  "access": "public",
@@ -17,7 +17,7 @@
17
17
  "lit": "^3.3.3"
18
18
  },
19
19
  "devDependencies": {
20
- "happy-dom": "^20.14.5",
21
- "rstack": "^0.8.3"
20
+ "happy-dom": "^21.0.1",
21
+ "rstack": "^0.8.5"
22
22
  }
23
23
  }
@@ -17,9 +17,9 @@
17
17
  "lit": "^3.3.3"
18
18
  },
19
19
  "devDependencies": {
20
- "@types/node": "^26.6.4",
21
- "happy-dom": "^20.14.5",
22
- "rstack": "^0.8.3",
20
+ "@types/node": "^26.6.5",
21
+ "happy-dom": "^21.0.1",
22
+ "rstack": "^0.8.5",
23
23
  "typescript": "^7.0.2"
24
24
  }
25
25
  }
@@ -14,13 +14,13 @@
14
14
  "test:watch": "rs test --watch"
15
15
  },
16
16
  "dependencies": {
17
- "preact": "^11.0.0"
17
+ "preact": "^11.0.1"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@rsbuild/plugin-preact": "^2.1.0",
21
21
  "@testing-library/jest-dom": "^7.0.1",
22
22
  "@testing-library/preact": "^3.2.4",
23
- "happy-dom": "^20.14.5",
24
- "rstack": "^0.8.3"
23
+ "happy-dom": "^21.0.1",
24
+ "rstack": "^0.8.5"
25
25
  }
26
26
  }
@@ -14,15 +14,15 @@
14
14
  "test:watch": "rs test --watch"
15
15
  },
16
16
  "dependencies": {
17
- "preact": "^11.0.0"
17
+ "preact": "^11.0.1"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@rsbuild/plugin-preact": "^2.1.0",
21
21
  "@testing-library/jest-dom": "^7.0.1",
22
22
  "@testing-library/preact": "^3.2.4",
23
- "@types/node": "^26.6.4",
24
- "happy-dom": "^20.14.5",
25
- "rstack": "^0.8.3",
23
+ "@types/node": "^26.6.5",
24
+ "happy-dom": "^21.0.1",
25
+ "rstack": "^0.8.5",
26
26
  "typescript": "^7.0.2"
27
27
  }
28
28
  }
@@ -22,7 +22,7 @@
22
22
  "@testing-library/dom": "^10.4.2",
23
23
  "@testing-library/jest-dom": "^7.0.1",
24
24
  "@testing-library/react": "^16.3.3",
25
- "happy-dom": "^20.14.5",
26
- "rstack": "^0.8.3"
25
+ "happy-dom": "^21.0.1",
26
+ "rstack": "^0.8.5"
27
27
  }
28
28
  }
@@ -22,11 +22,11 @@
22
22
  "@testing-library/dom": "^10.4.2",
23
23
  "@testing-library/jest-dom": "^7.0.1",
24
24
  "@testing-library/react": "^16.3.3",
25
- "@types/node": "^26.6.4",
25
+ "@types/node": "^26.6.5",
26
26
  "@types/react": "^19.3.0",
27
27
  "@types/react-dom": "^19.3.0",
28
- "happy-dom": "^20.14.5",
29
- "rstack": "^0.8.3",
28
+ "happy-dom": "^21.0.1",
29
+ "rstack": "^0.8.5",
30
30
  "typescript": "^7.0.2"
31
31
  }
32
32
  }
@@ -21,7 +21,7 @@
21
21
  "@rsbuild/plugin-solid": "^1.2.2",
22
22
  "@solidjs/testing-library": "^0.8.10",
23
23
  "@testing-library/jest-dom": "^7.0.1",
24
- "happy-dom": "^20.14.5",
25
- "rstack": "^0.8.3"
24
+ "happy-dom": "^21.0.1",
25
+ "rstack": "^0.8.5"
26
26
  }
27
27
  }
@@ -21,9 +21,9 @@
21
21
  "@rsbuild/plugin-solid": "^1.2.2",
22
22
  "@solidjs/testing-library": "^0.8.10",
23
23
  "@testing-library/jest-dom": "^7.0.1",
24
- "@types/node": "^26.6.4",
25
- "happy-dom": "^20.14.5",
26
- "rstack": "^0.8.3",
24
+ "@types/node": "^26.6.5",
25
+ "happy-dom": "^21.0.1",
26
+ "rstack": "^0.8.5",
27
27
  "typescript": "^7.0.2"
28
28
  }
29
29
  }
@@ -20,8 +20,8 @@
20
20
  "@rsbuild/plugin-svelte": "^2.0.1",
21
21
  "@testing-library/jest-dom": "^7.0.1",
22
22
  "@testing-library/svelte": "^5.4.2",
23
- "happy-dom": "^20.14.5",
23
+ "happy-dom": "^21.0.1",
24
24
  "prettier-plugin-svelte": "^4.1.1",
25
- "rstack": "^0.8.3"
25
+ "rstack": "^0.8.5"
26
26
  }
27
27
  }
@@ -20,10 +20,10 @@
20
20
  "@rsbuild/plugin-svelte": "^2.0.1",
21
21
  "@testing-library/jest-dom": "^7.0.1",
22
22
  "@testing-library/svelte": "^5.4.2",
23
- "@types/node": "^26.6.4",
24
- "happy-dom": "^20.14.5",
23
+ "@types/node": "^26.6.5",
24
+ "happy-dom": "^21.0.1",
25
25
  "prettier-plugin-svelte": "^4.1.1",
26
- "rstack": "^0.8.3",
26
+ "rstack": "^0.8.5",
27
27
  "svelte-check": "^4.7.6",
28
28
  "typescript": "^6.0.3"
29
29
  }
@@ -16,7 +16,7 @@
16
16
  "devDependencies": {
17
17
  "@testing-library/dom": "^10.4.2",
18
18
  "@testing-library/jest-dom": "^7.0.1",
19
- "happy-dom": "^20.14.5",
20
- "rstack": "^0.8.3"
19
+ "happy-dom": "^21.0.1",
20
+ "rstack": "^0.8.5"
21
21
  }
22
22
  }
@@ -16,9 +16,9 @@
16
16
  "devDependencies": {
17
17
  "@testing-library/dom": "^10.4.2",
18
18
  "@testing-library/jest-dom": "^7.0.1",
19
- "@types/node": "^26.6.4",
20
- "happy-dom": "^20.14.5",
21
- "rstack": "^0.8.3",
19
+ "@types/node": "^26.6.5",
20
+ "happy-dom": "^21.0.1",
21
+ "rstack": "^0.8.5",
22
22
  "typescript": "^7.0.2"
23
23
  }
24
24
  }
@@ -14,13 +14,13 @@
14
14
  "test:watch": "rs test --watch"
15
15
  },
16
16
  "dependencies": {
17
- "vue": "^3.5.43"
17
+ "vue": "^3.5.44"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@rsbuild/plugin-vue": "^2.0.1",
21
21
  "@testing-library/jest-dom": "^7.0.1",
22
22
  "@vue/test-utils": "^2.5.1",
23
- "happy-dom": "^20.14.5",
24
- "rstack": "^0.8.3"
23
+ "happy-dom": "^21.0.1",
24
+ "rstack": "^0.8.5"
25
25
  }
26
26
  }
@@ -14,16 +14,16 @@
14
14
  "test:watch": "rs test --watch"
15
15
  },
16
16
  "dependencies": {
17
- "vue": "^3.5.43"
17
+ "vue": "^3.5.44"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@rsbuild/plugin-vue": "^2.0.1",
21
21
  "@testing-library/jest-dom": "^7.0.1",
22
- "@types/node": "^26.6.4",
22
+ "@types/node": "^26.6.5",
23
23
  "@vue/test-utils": "^2.5.1",
24
- "happy-dom": "^20.14.5",
25
- "rstack": "^0.8.3",
24
+ "happy-dom": "^21.0.1",
25
+ "rstack": "^0.8.5",
26
26
  "typescript": "^6.0.3",
27
- "vue-tsc": "^3.3.12"
27
+ "vue-tsc": "^3.3.13"
28
28
  }
29
29
  }
@@ -13,12 +13,12 @@
13
13
  },
14
14
  "devDependencies": {
15
15
  "@rspress/core": "^2.0.23",
16
- "@types/node": "^26.6.4",
16
+ "@types/node": "^26.6.5",
17
17
  "@types/react": "^19.3.0",
18
18
  "@types/react-dom": "^19.3.0",
19
19
  "react": "^19.3.0",
20
20
  "react-dom": "^19.3.0",
21
- "rstack": "^0.8.3",
21
+ "rstack": "^0.8.5",
22
22
  "typescript": "^7.0.2"
23
23
  }
24
24
  }
@@ -13,12 +13,12 @@
13
13
  },
14
14
  "devDependencies": {
15
15
  "@rspress/core": "^2.0.23",
16
- "@types/node": "^26.6.4",
16
+ "@types/node": "^26.6.5",
17
17
  "@types/react": "^19.3.0",
18
18
  "@types/react-dom": "^19.3.0",
19
19
  "react": "^19.3.0",
20
20
  "react-dom": "^19.3.0",
21
- "rstack": "^0.8.3",
21
+ "rstack": "^0.8.5",
22
22
  "typescript": "^7.0.2"
23
23
  }
24
24
  }
@@ -18,10 +18,10 @@
18
18
  "test:watch": "rs test --watch"
19
19
  },
20
20
  "devDependencies": {
21
- "rstack": "^0.8.3"
21
+ "rstack": "^0.8.5"
22
22
  },
23
23
  "engines": {
24
- "node": ">=22.12.0"
24
+ "node": "^20.19.0 || >=22.12.0"
25
25
  },
26
26
  "publishConfig": {
27
27
  "access": "public"
@@ -24,12 +24,12 @@
24
24
  "test:watch": "rs test --watch"
25
25
  },
26
26
  "devDependencies": {
27
- "@types/node": "^26.6.4",
28
- "rstack": "^0.8.3",
27
+ "@types/node": "^26.6.5",
28
+ "rstack": "^0.8.5",
29
29
  "typescript": "^7.0.2"
30
30
  },
31
31
  "engines": {
32
- "node": ">=22.12.0"
32
+ "node": "^20.19.0 || >=22.12.0"
33
33
  },
34
34
  "publishConfig": {
35
35
  "access": "public"
@@ -22,10 +22,10 @@
22
22
  "@testing-library/jest-dom": "^7.0.1",
23
23
  "@testing-library/react": "^16.3.3",
24
24
  "@types/react-dom": "^19.3.0",
25
- "happy-dom": "^20.14.5",
25
+ "happy-dom": "^21.0.1",
26
26
  "react": "^19.3.0",
27
27
  "react-dom": "^19.3.0",
28
- "rstack": "^0.8.3"
28
+ "rstack": "^0.8.5"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "react": ">=18.0.0",
@@ -27,13 +27,13 @@
27
27
  "@testing-library/dom": "^10.4.2",
28
28
  "@testing-library/jest-dom": "^7.0.1",
29
29
  "@testing-library/react": "^16.3.3",
30
- "@types/node": "^26.6.4",
30
+ "@types/node": "^26.6.5",
31
31
  "@types/react": "^19.3.0",
32
32
  "@types/react-dom": "^19.3.0",
33
- "happy-dom": "^20.14.5",
33
+ "happy-dom": "^21.0.1",
34
34
  "react": "^19.3.0",
35
35
  "react-dom": "^19.3.0",
36
- "rstack": "^0.8.3",
36
+ "rstack": "^0.8.5",
37
37
  "typescript": "^7.0.2"
38
38
  },
39
39
  "peerDependencies": {
@@ -26,8 +26,8 @@
26
26
  "@rsbuild/plugin-solid": "^1.2.2",
27
27
  "@solidjs/testing-library": "^0.8.10",
28
28
  "@testing-library/jest-dom": "^7.0.1",
29
- "happy-dom": "^20.14.5",
30
- "rstack": "^0.8.3",
29
+ "happy-dom": "^21.0.1",
30
+ "rstack": "^0.8.5",
31
31
  "solid-js": "^1.9.17"
32
32
  },
33
33
  "peerDependencies": {
@@ -28,9 +28,9 @@
28
28
  "@rsbuild/plugin-solid": "^1.2.2",
29
29
  "@solidjs/testing-library": "^0.8.10",
30
30
  "@testing-library/jest-dom": "^7.0.1",
31
- "@types/node": "^26.6.4",
32
- "happy-dom": "^20.14.5",
33
- "rstack": "^0.8.3",
31
+ "@types/node": "^26.6.5",
32
+ "happy-dom": "^21.0.1",
33
+ "rstack": "^0.8.5",
34
34
  "solid-js": "^1.9.17",
35
35
  "typescript": "^7.0.2"
36
36
  },
@@ -18,9 +18,9 @@
18
18
  },
19
19
  "devDependencies": {
20
20
  "@rsbuild/plugin-svelte": "^2.0.1",
21
- "happy-dom": "^20.14.5",
21
+ "happy-dom": "^21.0.1",
22
22
  "prettier-plugin-svelte": "^4.1.1",
23
- "rstack": "^0.8.3",
23
+ "rstack": "^0.8.5",
24
24
  "svelte": "^5.57.2"
25
25
  },
26
26
  "peerDependencies": {
@@ -24,10 +24,10 @@
24
24
  },
25
25
  "devDependencies": {
26
26
  "@rsbuild/plugin-svelte": "^2.0.1",
27
- "@types/node": "^26.6.4",
28
- "happy-dom": "^20.14.5",
27
+ "@types/node": "^26.6.5",
28
+ "happy-dom": "^21.0.1",
29
29
  "prettier-plugin-svelte": "^4.1.1",
30
- "rstack": "^0.8.3",
30
+ "rstack": "^0.8.5",
31
31
  "svelte": "^5.57.2",
32
32
  "svelte-check": "^4.7.6",
33
33
  "svelte2tsx": "^0.7.61",
@@ -20,9 +20,9 @@
20
20
  "@rsbuild/plugin-vue": "^2.0.1",
21
21
  "@testing-library/jest-dom": "^7.0.1",
22
22
  "@vue/test-utils": "^2.5.1",
23
- "happy-dom": "^20.14.5",
24
- "rstack": "^0.8.3",
25
- "vue": "^3.5.43"
23
+ "happy-dom": "^21.0.1",
24
+ "rstack": "^0.8.5",
25
+ "vue": "^3.5.44"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "vue": ">=3.2.0"
@@ -25,13 +25,13 @@
25
25
  "devDependencies": {
26
26
  "@rsbuild/plugin-vue": "^2.0.1",
27
27
  "@testing-library/jest-dom": "^7.0.1",
28
- "@types/node": "^26.6.4",
28
+ "@types/node": "^26.6.5",
29
29
  "@vue/test-utils": "^2.5.1",
30
- "happy-dom": "^20.14.5",
31
- "rstack": "^0.8.3",
30
+ "happy-dom": "^21.0.1",
31
+ "rstack": "^0.8.5",
32
32
  "typescript": "^6.0.3",
33
- "vue": "^3.5.43",
34
- "vue-tsc": "^3.3.12"
33
+ "vue": "^3.5.44",
34
+ "vue-tsc": "^3.3.13"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "vue": ">=3.2.0"
@@ -0,0 +1,2 @@
1
+ # Let Rstack load environment files for the current command.
2
+ NX_LOAD_DOT_ENV_FILES=false
@@ -0,0 +1,37 @@
1
+ # Nx + Rstack
2
+
3
+ ## Setup
4
+
5
+ ```bash
6
+ pnpm install
7
+ ```
8
+
9
+ ## Structure
10
+
11
+ - `apps/web`: React application.
12
+ - `packages/ui`: Shared UI components.
13
+ - `tsconfig.base.json`: Shared TypeScript configuration.
14
+
15
+ ## Scripts
16
+
17
+ Run from the repository root:
18
+
19
+ - `pnpm run build`: Build all packages.
20
+ - `pnpm run dev`: Start the web app and watch the shared UI package.
21
+ - `pnpm run test`: Run tests.
22
+ - `pnpm run check`: Run lint, formatting, and TypeScript checks.
23
+ - `pnpm run lint`: Lint the workspace.
24
+ - `pnpm run format`: Format the workspace.
25
+
26
+ Nx discovers projects and tasks from workspace package manifests. Build and test tasks are cached, and dependencies are built first.
27
+
28
+ The root `.env` disables Nx's environment-file loading so Rstack can load each project's environment files with the correct mode and priority.
29
+
30
+ Run `pnpm run build` before `pnpm run check`.
31
+
32
+ Use `pnpm exec nx graph` to explore the project graph.
33
+
34
+ ## Learn more
35
+
36
+ - [Rstack CLI monorepo guide](https://rstack.rs/guide/monorepo)
37
+ - [Nx documentation](https://nx.dev/docs/getting-started/intro)
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "web",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "build": "rs build",
8
+ "dev": "rs dev",
9
+ "preview": "rs preview",
10
+ "test": "rs test"
11
+ },
12
+ "dependencies": {
13
+ "@repo/ui": "workspace:^",
14
+ "react": "^19.3.0",
15
+ "react-dom": "^19.3.0"
16
+ },
17
+ "devDependencies": {
18
+ "@rsbuild/plugin-react": "^2.1.1",
19
+ "@testing-library/dom": "^10.4.2",
20
+ "@testing-library/jest-dom": "^7.0.1",
21
+ "@testing-library/react": "^16.3.3",
22
+ "@types/react": "^19.3.0",
23
+ "@types/react-dom": "^19.3.0",
24
+ "happy-dom": "^21.0.1"
25
+ }
26
+ }
@@ -0,0 +1,13 @@
1
+ // Configuration guide: https://rstack.rs/config
2
+ import { define } from 'rstack';
3
+
4
+ define.app(async () => {
5
+ const { pluginReact } = await import('@rsbuild/plugin-react');
6
+ return {
7
+ plugins: [pluginReact()],
8
+ };
9
+ });
10
+
11
+ define.test({
12
+ setupFiles: ['./tests/rstest.setup.ts'],
13
+ });
@@ -0,0 +1,17 @@
1
+ import { Button } from '@repo/ui/button';
2
+
3
+ export function App() {
4
+ return (
5
+ <main>
6
+ <h1>Web</h1>
7
+ <p>Nx + Rstack CLI</p>
8
+ <p>Edit apps/web/src/App.tsx to get started.</p>
9
+ <Button onClick={() => window.alert('Hello from @repo/ui!')}>
10
+ Shared button
11
+ </Button>
12
+ <nav>
13
+ <a href="https://rstack.rs">Rstack documentation</a>
14
+ </nav>
15
+ </main>
16
+ );
17
+ }
@@ -0,0 +1,27 @@
1
+ body {
2
+ margin: 0;
3
+ font-family: system-ui, sans-serif;
4
+ color: #202124;
5
+ background: #f8f9fa;
6
+ }
7
+
8
+ main {
9
+ max-width: 640px;
10
+ margin: 15vh auto;
11
+ padding: 24px;
12
+ }
13
+
14
+ button {
15
+ padding: 10px 16px;
16
+ border: 0;
17
+ border-radius: 8px;
18
+ color: white;
19
+ background: #5755d9;
20
+ cursor: pointer;
21
+ }
22
+
23
+ nav {
24
+ display: flex;
25
+ gap: 20px;
26
+ margin-top: 24px;
27
+ }
@@ -0,0 +1,13 @@
1
+ import { StrictMode } from 'react';
2
+ import { createRoot } from 'react-dom/client';
3
+ import { App } from './App';
4
+ import './index.css';
5
+
6
+ const root = document.getElementById('root');
7
+ if (root) {
8
+ createRoot(root).render(
9
+ <StrictMode>
10
+ <App />
11
+ </StrictMode>,
12
+ );
13
+ }
@@ -0,0 +1,11 @@
1
+ import { expect, test } from 'rstack/test';
2
+ import { render, screen } from '@testing-library/react';
3
+ import { App } from '../src/App';
4
+
5
+ test('renders the web app with the shared UI package', () => {
6
+ render(<App />);
7
+ expect(screen.getByRole('heading', { name: 'Web' })).toBeInTheDocument();
8
+ expect(
9
+ screen.getByRole('button', { name: 'Shared button' }),
10
+ ).toBeInTheDocument();
11
+ });
@@ -0,0 +1,4 @@
1
+ import { expect } from 'rstack/test';
2
+ import * as jestDomMatchers from '@testing-library/jest-dom/matchers';
3
+
4
+ expect.extend(jestDomMatchers);