create-tsrouter-app 0.9.7 → 0.10.0-alpha.3

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 (234) hide show
  1. package/README.md +3 -1
  2. package/dist/index.js +1 -1
  3. package/package.json +2 -17
  4. package/project.json +16 -0
  5. package/src/index.ts +1 -1
  6. package/tsconfig.json +2 -8
  7. package/.gitattributes +0 -2
  8. package/.github/FUNDING.yml +0 -1
  9. package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -94
  10. package/.github/ISSUE_TEMPLATE/config.yml +0 -11
  11. package/.github/workflows/ci.yml +0 -45
  12. package/.nvmrc +0 -1
  13. package/.prettierignore +0 -3
  14. package/CONTRIBUTING.md +0 -34
  15. package/dist/add-ons.js +0 -69
  16. package/dist/cli.js +0 -89
  17. package/dist/constants.js +0 -4
  18. package/dist/create-app.js +0 -451
  19. package/dist/environment.js +0 -43
  20. package/dist/mcp.js +0 -211
  21. package/dist/options.js +0 -292
  22. package/dist/package-manager.js +0 -30
  23. package/dist/toolchain.js +0 -2
  24. package/dist/types.js +0 -1
  25. package/eslint.config.js +0 -35
  26. package/prettier.config.js +0 -10
  27. package/scripts/publish.js +0 -33
  28. package/src/add-ons.ts +0 -156
  29. package/src/cli.ts +0 -135
  30. package/src/constants.ts +0 -7
  31. package/src/create-app.ts +0 -730
  32. package/src/environment.ts +0 -70
  33. package/src/mcp.ts +0 -252
  34. package/src/options.ts +0 -338
  35. package/src/package-manager.ts +0 -46
  36. package/src/toolchain.ts +0 -3
  37. package/src/types.ts +0 -34
  38. package/templates/react/add-on/clerk/README.md +0 -3
  39. package/templates/react/add-on/clerk/assets/_dot_env.local.append +0 -2
  40. package/templates/react/add-on/clerk/assets/src/integrations/clerk/header-user.tsx +0 -19
  41. package/templates/react/add-on/clerk/assets/src/integrations/clerk/provider.tsx +0 -18
  42. package/templates/react/add-on/clerk/assets/src/routes/demo.clerk.tsx +0 -20
  43. package/templates/react/add-on/clerk/info.json +0 -13
  44. package/templates/react/add-on/clerk/package.json +0 -5
  45. package/templates/react/add-on/convex/README.md +0 -4
  46. package/templates/react/add-on/convex/assets/_dot_cursorrules.append +0 -93
  47. package/templates/react/add-on/convex/assets/_dot_env.local.append +0 -3
  48. package/templates/react/add-on/convex/assets/convex/products.ts +0 -8
  49. package/templates/react/add-on/convex/assets/convex/schema.ts +0 -10
  50. package/templates/react/add-on/convex/assets/src/integrations/convex/provider.tsx +0 -20
  51. package/templates/react/add-on/convex/assets/src/routes/demo.convex.tsx +0 -33
  52. package/templates/react/add-on/convex/info.json +0 -13
  53. package/templates/react/add-on/convex/package.json +0 -6
  54. package/templates/react/add-on/form/assets/src/components/demo.FormComponents.tsx.ejs +0 -300
  55. package/templates/react/add-on/form/assets/src/hooks/demo.form-context.ts +0 -4
  56. package/templates/react/add-on/form/assets/src/hooks/demo.form.ts +0 -22
  57. package/templates/react/add-on/form/assets/src/routes/demo.form.address.tsx.ejs +0 -213
  58. package/templates/react/add-on/form/assets/src/routes/demo.form.simple.tsx.ejs +0 -77
  59. package/templates/react/add-on/form/info.json +0 -26
  60. package/templates/react/add-on/form/package.json +0 -6
  61. package/templates/react/add-on/module-federation/assets/module-federation.config.js.ejs +0 -31
  62. package/templates/react/add-on/module-federation/assets/src/demo-mf-component.tsx +0 -3
  63. package/templates/react/add-on/module-federation/assets/src/demo-mf-self-contained.tsx +0 -11
  64. package/templates/react/add-on/module-federation/info.json +0 -7
  65. package/templates/react/add-on/module-federation/package.json +0 -5
  66. package/templates/react/add-on/netlify/README.md +0 -11
  67. package/templates/react/add-on/netlify/info.json +0 -7
  68. package/templates/react/add-on/sentry/assets/_dot_cursorrules.append +0 -22
  69. package/templates/react/add-on/sentry/assets/_dot_env.local.append +0 -2
  70. package/templates/react/add-on/sentry/assets/src/app/global-middleware.ts +0 -25
  71. package/templates/react/add-on/sentry/assets/src/routes/demo.sentry.testing.tsx +0 -480
  72. package/templates/react/add-on/sentry/info.json +0 -14
  73. package/templates/react/add-on/sentry/package.json +0 -7
  74. package/templates/react/add-on/shadcn/README.md +0 -7
  75. package/templates/react/add-on/shadcn/assets/_dot_cursorrules.append +0 -7
  76. package/templates/react/add-on/shadcn/assets/components.json +0 -21
  77. package/templates/react/add-on/shadcn/assets/src/lib/utils.ts +0 -6
  78. package/templates/react/add-on/shadcn/assets/src/styles.css +0 -138
  79. package/templates/react/add-on/shadcn/info.json +0 -7
  80. package/templates/react/add-on/shadcn/package.json +0 -9
  81. package/templates/react/add-on/start/assets/_dot_gitignore.append +0 -2
  82. package/templates/react/add-on/start/assets/app.config.ts.ejs +0 -19
  83. package/templates/react/add-on/start/assets/postcss.config.ts +0 -5
  84. package/templates/react/add-on/start/assets/src/api.ts +0 -6
  85. package/templates/react/add-on/start/assets/src/client.tsx +0 -8
  86. package/templates/react/add-on/start/assets/src/router.tsx.ejs +0 -68
  87. package/templates/react/add-on/start/assets/src/routes/api.demo-names.ts +0 -11
  88. package/templates/react/add-on/start/assets/src/routes/demo.start.api-request.tsx.ejs +0 -33
  89. package/templates/react/add-on/start/assets/src/routes/demo.start.server-funcs.tsx +0 -50
  90. package/templates/react/add-on/start/assets/src/ssr.tsx +0 -12
  91. package/templates/react/add-on/start/info.json +0 -18
  92. package/templates/react/add-on/start/package.json +0 -15
  93. package/templates/react/add-on/store/assets/src/lib/demo-store.ts +0 -13
  94. package/templates/react/add-on/store/assets/src/routes/demo.store.tsx.ejs +0 -75
  95. package/templates/react/add-on/store/info.json +0 -13
  96. package/templates/react/add-on/store/package.json +0 -6
  97. package/templates/react/add-on/table/assets/src/data/demo-table-data.ts +0 -50
  98. package/templates/react/add-on/table/assets/src/routes/demo.table.tsx.ejs +0 -373
  99. package/templates/react/add-on/table/info.json +0 -13
  100. package/templates/react/add-on/table/package.json +0 -7
  101. package/templates/react/add-on/tanstack-query/assets/src/integrations/tanstack-query/layout.tsx +0 -5
  102. package/templates/react/add-on/tanstack-query/assets/src/integrations/tanstack-query/root-provider.tsx +0 -15
  103. package/templates/react/add-on/tanstack-query/assets/src/routes/demo.tanstack-query.tsx.ejs +0 -38
  104. package/templates/react/add-on/tanstack-query/info.json +0 -13
  105. package/templates/react/add-on/tanstack-query/package.json +0 -6
  106. package/templates/react/base/README.md.ejs +0 -555
  107. package/templates/react/base/_dot_gitignore +0 -5
  108. package/templates/react/base/_dot_vscode/settings.biome.json +0 -38
  109. package/templates/react/base/_dot_vscode/settings.json +0 -11
  110. package/templates/react/base/index.html.ejs +0 -20
  111. package/templates/react/base/package.biome.json +0 -10
  112. package/templates/react/base/package.json +0 -29
  113. package/templates/react/base/package.ts.json +0 -7
  114. package/templates/react/base/package.tw.json +0 -6
  115. package/templates/react/base/public/favicon.ico +0 -0
  116. package/templates/react/base/public/logo192.png +0 -0
  117. package/templates/react/base/public/logo512.png +0 -0
  118. package/templates/react/base/public/manifest.json +0 -25
  119. package/templates/react/base/public/robots.txt +0 -3
  120. package/templates/react/base/src/App.css +0 -38
  121. package/templates/react/base/src/App.test.tsx.ejs +0 -10
  122. package/templates/react/base/src/App.tsx.ejs +0 -74
  123. package/templates/react/base/src/components/Header.tsx.ejs +0 -27
  124. package/templates/react/base/src/logo.svg +0 -44
  125. package/templates/react/base/src/reportWebVitals.ts.ejs +0 -28
  126. package/templates/react/base/src/styles.css.ejs +0 -15
  127. package/templates/react/base/toolchain/biome.json +0 -31
  128. package/templates/react/base/tsconfig.json.ejs +0 -28
  129. package/templates/react/base/vite.config.js.ejs +0 -24
  130. package/templates/react/code-router/src/main.tsx.ejs +0 -92
  131. package/templates/react/example/tanchat/README.md +0 -37
  132. package/templates/react/example/tanchat/assets/_dot_env.local.append +0 -2
  133. package/templates/react/example/tanchat/assets/public/example-guitar-dune.jpg +0 -0
  134. package/templates/react/example/tanchat/assets/public/example-guitar-motherboard.jpg +0 -0
  135. package/templates/react/example/tanchat/assets/public/example-guitar-racing.jpg +0 -0
  136. package/templates/react/example/tanchat/assets/public/example-guitar-steamer-trunk.jpg +0 -0
  137. package/templates/react/example/tanchat/assets/public/example-guitar-steampunk.jpg +0 -0
  138. package/templates/react/example/tanchat/assets/public/example-guitar-underwater.jpg +0 -0
  139. package/templates/react/example/tanchat/assets/src/components/example-AIAssistant.tsx +0 -173
  140. package/templates/react/example/tanchat/assets/src/components/example-GuitarRecommendation.tsx +0 -47
  141. package/templates/react/example/tanchat/assets/src/data/example-guitars.ts +0 -73
  142. package/templates/react/example/tanchat/assets/src/demo.index.css +0 -220
  143. package/templates/react/example/tanchat/assets/src/integrations/tanchat/header-user.tsx +0 -5
  144. package/templates/react/example/tanchat/assets/src/routes/example.chat.tsx +0 -159
  145. package/templates/react/example/tanchat/assets/src/routes/example.guitars/$guitarId.tsx +0 -50
  146. package/templates/react/example/tanchat/assets/src/routes/example.guitars/index.tsx +0 -54
  147. package/templates/react/example/tanchat/assets/src/store/example-assistant.ts +0 -3
  148. package/templates/react/example/tanchat/assets/src/utils/demo.ai.ts +0 -62
  149. package/templates/react/example/tanchat/assets/src/utils/demo.tools.ts +0 -47
  150. package/templates/react/example/tanchat/info.json +0 -19
  151. package/templates/react/example/tanchat/package.json +0 -15
  152. package/templates/react/file-router/package.fr.json +0 -5
  153. package/templates/react/file-router/src/main.tsx.ejs +0 -55
  154. package/templates/react/file-router/src/routes/__root.tsx.ejs +0 -74
  155. package/templates/solid/add-on/form/assets/src/routes/demo.form.tsx.ejs +0 -352
  156. package/templates/solid/add-on/form/info.json +0 -13
  157. package/templates/solid/add-on/form/package.json +0 -5
  158. package/templates/solid/add-on/module-federation/assets/module-federation.config.js.ejs +0 -27
  159. package/templates/solid/add-on/module-federation/assets/src/demo-mf-component.tsx +0 -3
  160. package/templates/solid/add-on/module-federation/assets/src/demo-mf-self-contained.tsx +0 -9
  161. package/templates/solid/add-on/module-federation/info.json +0 -7
  162. package/templates/solid/add-on/module-federation/package.json +0 -5
  163. package/templates/solid/add-on/sentry/assets/_dot_cursorrules.append +0 -22
  164. package/templates/solid/add-on/sentry/assets/_dot_env.local.append +0 -2
  165. package/templates/solid/add-on/sentry/assets/src/routes/demo.sentry.bad-event-handler.tsx +0 -20
  166. package/templates/solid/add-on/sentry/info.json +0 -13
  167. package/templates/solid/add-on/sentry/package.json +0 -5
  168. package/templates/solid/add-on/solid-ui/README.md +0 -9
  169. package/templates/solid/add-on/solid-ui/assets/src/lib/utils.ts +0 -6
  170. package/templates/solid/add-on/solid-ui/assets/src/styles.css +0 -138
  171. package/templates/solid/add-on/solid-ui/assets/ui.config.json +0 -13
  172. package/templates/solid/add-on/solid-ui/info.json +0 -11
  173. package/templates/solid/add-on/solid-ui/package.json +0 -9
  174. package/templates/solid/add-on/store/assets/src/lib/demo-store.ts +0 -13
  175. package/templates/solid/add-on/store/assets/src/routes/demo.store.tsx.ejs +0 -77
  176. package/templates/solid/add-on/store/info.json +0 -13
  177. package/templates/solid/add-on/store/package.json +0 -6
  178. package/templates/solid/add-on/tanstack-query/assets/src/integrations/tanstack-query/header-user.tsx +0 -5
  179. package/templates/solid/add-on/tanstack-query/assets/src/integrations/tanstack-query/provider.tsx +0 -15
  180. package/templates/solid/add-on/tanstack-query/assets/src/routes/demo.tanstack-query.tsx +0 -30
  181. package/templates/solid/add-on/tanstack-query/info.json +0 -13
  182. package/templates/solid/add-on/tanstack-query/package.json +0 -6
  183. package/templates/solid/base/README.md.ejs +0 -200
  184. package/templates/solid/base/_dot_cursorrules.append +0 -35
  185. package/templates/solid/base/_dot_gitignore +0 -5
  186. package/templates/solid/base/_dot_vscode/settings.biome.json +0 -38
  187. package/templates/solid/base/_dot_vscode/settings.json +0 -11
  188. package/templates/solid/base/index.html.ejs +0 -20
  189. package/templates/solid/base/package.biome.json +0 -10
  190. package/templates/solid/base/package.json +0 -22
  191. package/templates/solid/base/package.ts.json +0 -5
  192. package/templates/solid/base/package.tw.json +0 -6
  193. package/templates/solid/base/public/favicon.ico +0 -0
  194. package/templates/solid/base/public/logo192.png +0 -0
  195. package/templates/solid/base/public/logo512.png +0 -0
  196. package/templates/solid/base/public/manifest.json +0 -25
  197. package/templates/solid/base/public/robots.txt +0 -3
  198. package/templates/solid/base/src/App.css +0 -0
  199. package/templates/solid/base/src/App.tsx.ejs +0 -47
  200. package/templates/solid/base/src/components/Header.tsx.ejs +0 -26
  201. package/templates/solid/base/src/logo.svg +0 -120
  202. package/templates/solid/base/src/styles.css.ejs +0 -15
  203. package/templates/solid/base/toolchain/biome.json +0 -31
  204. package/templates/solid/base/tsconfig.json.ejs +0 -30
  205. package/templates/solid/base/vite.config.js.ejs +0 -22
  206. package/templates/solid/code-router/src/main.tsx.ejs +0 -71
  207. package/templates/solid/example/tanchat/README.md +0 -52
  208. package/templates/solid/example/tanchat/assets/ai-streaming-server/README.md +0 -110
  209. package/templates/solid/example/tanchat/assets/ai-streaming-server/_dot_env.example +0 -1
  210. package/templates/solid/example/tanchat/assets/ai-streaming-server/package.json +0 -26
  211. package/templates/solid/example/tanchat/assets/ai-streaming-server/src/index.ts +0 -102
  212. package/templates/solid/example/tanchat/assets/ai-streaming-server/tsconfig.json +0 -15
  213. package/templates/solid/example/tanchat/assets/src/components/demo.SettingsDialog.tsx +0 -149
  214. package/templates/solid/example/tanchat/assets/src/demo.index.css +0 -227
  215. package/templates/solid/example/tanchat/assets/src/lib/demo-store.ts +0 -13
  216. package/templates/solid/example/tanchat/assets/src/routes/example.chat.tsx +0 -435
  217. package/templates/solid/example/tanchat/assets/src/store/demo.hooks.ts +0 -17
  218. package/templates/solid/example/tanchat/assets/src/store/demo.store.ts +0 -133
  219. package/templates/solid/example/tanchat/info.json +0 -14
  220. package/templates/solid/example/tanchat/package.json +0 -7
  221. package/templates/solid/file-router/package.fr.json +0 -5
  222. package/templates/solid/file-router/src/main.tsx.ejs +0 -47
  223. package/templates/solid/file-router/src/routes/__root.tsx.ejs +0 -41
  224. package/templates/solid/file-router/src/routes/index.tsx +0 -43
  225. package/tests/cra.test.ts +0 -232
  226. package/tests/snapshots/cra/cr-js-npm.json +0 -32
  227. package/tests/snapshots/cra/cr-ts-npm.json +0 -33
  228. package/tests/snapshots/cra/fr-ts-npm.json +0 -33
  229. package/tests/snapshots/cra/fr-ts-tw-npm.json +0 -32
  230. package/tests/snapshots/cra/solid-cr-js-npm.json +0 -30
  231. package/tests/snapshots/cra/solid-cr-ts-npm.json +0 -31
  232. package/tests/snapshots/cra/solid-fr-ts-npm.json +0 -32
  233. package/tests/snapshots/cra/solid-fr-ts-tw-npm.json +0 -31
  234. package/tests/test-utilities.ts +0 -83
package/README.md CHANGED
@@ -46,7 +46,7 @@ Available options:
46
46
  - `--template <type>`: Choose between `file-router`, `typescript`, or `javascript`
47
47
  - `--tailwind`: Enable Tailwind CSS
48
48
  - `--package-manager`: Specify your preferred package manager (`npm`, `yarn`, `pnpm`, `bun`, or `deno`)
49
- - `--toolchain`: Specify your toolchain solution for formatting/linting (`biome`)
49
+ - `--toolchain`: Specify your toolchain solution for formatting/linting (`biome`, `eslint+prettier`)
50
50
  - `--no-git`: Do not initialize a git repository
51
51
  - `--add-ons`: Enable add-on selection or specify add-ons to install
52
52
 
@@ -102,6 +102,8 @@ Choose your preferred solution for formatting and linting either through the int
102
102
 
103
103
  Setting this flag to `biome` will configure it as your toolchain of choice, adding a `biome.json` to the root of the project. Consult the [biome documentation](https://biomejs.dev/guides/getting-started/) for further customization.
104
104
 
105
+ Setting this flag to `eslint+prettier` will configure it as your toolchain of choice, adding an `eslint.config.js` and `prettier.config.js` to the root of the project, as well as a `.prettierignore` file. Consult the [eslint documentation](https://eslint.org/docs/latest/) and [prettier documentation](https://prettier.io/docs/) for further customization.
106
+
105
107
  ## Add-ons (experimental)
106
108
 
107
109
  You can enable add-on selection:
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import { cli } from './cli.js';
2
+ import { cli } from 'engine';
3
3
  cli();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-tsrouter-app",
3
- "version": "0.9.7",
3
+ "version": "0.10.0-alpha.3",
4
4
  "description": "Tanstack Application Builder",
5
5
  "bin": "./dist/index.js",
6
6
  "type": "module",
@@ -22,25 +22,10 @@
22
22
  "author": "Jack Herrington <jherr@pobox.com>",
23
23
  "license": "MIT",
24
24
  "dependencies": {
25
- "@clack/prompts": "^0.10.0",
26
- "@modelcontextprotocol/sdk": "^1.6.0",
27
- "chalk": "^5.4.1",
28
- "commander": "^13.1.0",
29
- "ejs": "^3.1.10",
30
- "execa": "^9.5.2",
31
- "express": "^4.21.2",
32
- "prettier": "^3.5.0",
33
- "vitest": "^3.0.8",
34
- "zod": "^3.24.2"
25
+ "engine": "0.11.0-alpha.2"
35
26
  },
36
27
  "devDependencies": {
37
- "@tanstack/config": "^0.16.2",
38
- "@types/ejs": "^3.1.5",
39
- "@types/express": "^5.0.0",
40
28
  "@types/node": "^22.13.4",
41
- "eslint": "^9.20.0",
42
- "eslint-plugin-react-hooks": "^5.1.0",
43
- "eslint-plugin-unused-imports": "^4.1.4",
44
29
  "typescript": "^5.6.3"
45
30
  },
46
31
  "scripts": {}
package/project.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "create-tsrouter-app",
3
+ "$schema": "../../node_modules/nx/schemas/project-schema.json",
4
+ "sourceRoot": "cli/create-tsrouter-app/src",
5
+ "projectType": "application",
6
+ "targets": {
7
+ "build": {
8
+ "executor": "nx:run-commands",
9
+ "options": {
10
+ "command": "tsc -p cli/create-tsrouter-app/tsconfig.json"
11
+ },
12
+ "dependsOn": ["^build"]
13
+ }
14
+ },
15
+ "implicitDependencies": ["engine", "templates"]
16
+ }
package/src/index.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import { cli } from './cli.js'
2
+ import { cli } from 'engine'
3
3
 
4
4
  cli()
package/tsconfig.json CHANGED
@@ -1,14 +1,8 @@
1
1
  {
2
+ "extends": "../../tsconfig.json",
2
3
  "compilerOptions": {
3
- "target": "ES2020",
4
- "module": "ES2020",
5
4
  "outDir": "./dist",
6
- "rootDir": "./src",
7
- "strict": true,
8
- "esModuleInterop": true,
9
- "skipLibCheck": true,
10
- "forceConsistentCasingInFileNames": true,
11
- "moduleResolution": "node"
5
+ "rootDir": "./src"
12
6
  },
13
7
  "include": ["./src/**/*.ts"],
14
8
  "exclude": ["node_modules", "dist"]
package/.gitattributes DELETED
@@ -1,2 +0,0 @@
1
- # Auto detect text files and perform LF normalization
2
- * text=auto
@@ -1 +0,0 @@
1
- github: tannerlinsley
@@ -1,94 +0,0 @@
1
- name: '🐛 Bug report'
2
- description: Create a report to help us improve
3
- body:
4
- - type: markdown
5
- attributes:
6
- value: |
7
- Thank you for reporting an issue :pray:.
8
-
9
- This issue tracker is for reporting bugs found in `create-tsrouter-app` (https://github.com/tanstack/create-tsrouter-app).
10
- If you have a question about how to achieve something and are struggling, please post a question
11
- inside of `create-tsrouter-app` Discussions tab: https://github.com/tanstack/create-tsrouter-app/discussions
12
-
13
- Before submitting a new bug/issue, please check the links below to see if there is a solution or question posted there already:
14
- - `create-tsrouter-app` Issues tab: https://github.com/tanstack/create-tsrouter-app/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc
15
- - `create-tsrouter-app` closed issues tab: https://github.com/tanstack/create-tsrouter-app/issues?q=is%3Aissue+sort%3Aupdated-desc+is%3Aclosed
16
- - `create-tsrouter-app` Discussions tab: https://github.com/tanstack/create-tsrouter-app/discussions
17
-
18
- The more information you fill in, the better the community can help you.
19
- - type: dropdown
20
- id: project
21
- attributes:
22
- label: Which project does this relate to?
23
- description: If you are unsure, please leave this as "Create Tanstack App".
24
- options:
25
- - Create Tanstack App
26
- validations:
27
- required: true
28
- - type: textarea
29
- id: description
30
- attributes:
31
- label: Describe the bug
32
- description: Provide a clear and concise description of the challenge you are running into.
33
- validations:
34
- required: true
35
- - type: input
36
- id: link
37
- attributes:
38
- label: Your Example Website or App
39
- description: |
40
- Which website or app were you using when the bug happened?
41
- Note:
42
- - Please provide a link via our pre-configured Stackblitz project ([file-based routes](https://stackblitz.com/github/tanstack/router/tree/main/examples/react/quickstart-file-based?file=src%2Fmain.tsx)|[code-based routes](https://stackblitz.com/github/tanstack/router/tree/main/examples/react/quickstart?file=src%2Fmain.tsx)) or a link to a repo that can reproduce the issue.
43
- - Your bug will may get fixed much faster if we can run your code and it doesn't have dependencies other than the `router` npm package / dependency.
44
- - To create a shareable code example you can use Stackblitz. Please no localhost URLs.
45
- - Please read these tips for providing a minimal example: https://stackoverflow.com/help/mcve.
46
- placeholder: reproduction URL
47
- validations:
48
- required: true
49
- - type: textarea
50
- id: steps
51
- attributes:
52
- label: Steps to Reproduce the Bug or Issue
53
- description: Describe the steps we have to take to reproduce the behavior.
54
- placeholder: |
55
- 1. Go to '...'
56
- 2. Click on '....'
57
- 3. Scroll down to '....'
58
- 4. See error
59
- validations:
60
- required: true
61
- - type: textarea
62
- id: expected
63
- attributes:
64
- label: Expected behavior
65
- description: Provide a clear and concise description of what you expected to happen.
66
- placeholder: |
67
- As a user, I expected ___ behavior but i am seeing ___
68
- validations:
69
- required: true
70
- - type: textarea
71
- id: screenshots_or_videos
72
- attributes:
73
- label: Screenshots or Videos
74
- description: |
75
- If applicable, add screenshots or a video to help explain your problem.
76
- For more information on the supported file image/file types and the file size limits, please refer
77
- to the following link: https://docs.github.com/en/github/writing-on-github/working-with-advanced-formatting/attaching-files
78
- placeholder: |
79
- You can drag your video or image files inside of this editor ↓
80
- - type: textarea
81
- id: platform
82
- attributes:
83
- label: Platform
84
- value: |
85
- - OS: [e.g. macOS, Windows, Linux]
86
- - Browser: [e.g. Chrome, Safari, Firefox]
87
- - Version: [e.g. 91.1]
88
- validations:
89
- required: true
90
- - type: textarea
91
- id: additional
92
- attributes:
93
- label: Additional context
94
- description: Add any other context about the problem here.
@@ -1,11 +0,0 @@
1
- blank_issues_enabled: false
2
- contact_links:
3
- - name: 🤔 Feature Requests & Questions
4
- url: https://github.com/tanstack/create-tsrouter-app/discussions
5
- about: Please ask and answer questions here.
6
- - name: 💬 Community Chat
7
- url: https://discord.gg/mQd7egN
8
- about: A dedicated discord server hosted by Tanner Linsley
9
- - name: 💬 Tanstack Twitter
10
- url: https://twitter.com/tan_stack
11
- about: Stay up to date with new releases of our libraries
@@ -1,45 +0,0 @@
1
- name: ci
2
-
3
- on:
4
- workflow_dispatch:
5
- inputs:
6
- tag:
7
- description: override release tag
8
- required: false
9
- push:
10
- branches: [main, alpha, beta]
11
-
12
- concurrency:
13
- group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
14
- cancel-in-progress: true
15
-
16
- permissions:
17
- contents: write
18
- id-token: write
19
-
20
- jobs:
21
- test-and-publish:
22
- name: Test & Publish
23
- if: github.repository_owner == 'TanStack'
24
- runs-on: ubuntu-latest
25
- steps:
26
- - name: Checkout
27
- uses: actions/checkout@v4.2.2
28
- with:
29
- fetch-depth: 0
30
- - name: Setup Tools
31
- uses: tanstack/config/.github/setup@main
32
- - name: Test
33
- run: pnpm test
34
- - name: Build
35
- run: pnpm build
36
- - name: Publish
37
- run: |
38
- git config --global user.name 'Tanner Linsley'
39
- git config --global user.email 'tannerlinsley@users.noreply.github.com'
40
- npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
41
- pnpm run cipublish
42
- env:
43
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
45
- TAG: ${{ inputs.tag }}
package/.nvmrc DELETED
@@ -1 +0,0 @@
1
- 20.17.0
package/.prettierignore DELETED
@@ -1,3 +0,0 @@
1
- dist
2
- project-template
3
- node_modules
package/CONTRIBUTING.md DELETED
@@ -1,34 +0,0 @@
1
- # Contributing
2
-
3
- - Clone the repo
4
- - `gh repo clone TanStack/create-tsrouter-app`
5
- - Ensure `node` is installed
6
- - https://nodejs.org/en/
7
- - Ensure `pnpm` is installed
8
- - https://pnpm.io/installation
9
- - Why? We use `pnpm` to manage workspace dependencies. It's easily the best monorepo/workspace experience available as of when this was written.
10
- - Install dependencies
11
- - `pnpm install`
12
- - This installs dependencies for all of the packages in the monorepo, even examples!
13
- - Dependencies inside of the packages and examples are automatically linked together as local/dynamic dependencies.
14
- - Run the build
15
- - `pnpm build`
16
- - Build an example app with the builder
17
- - `pnpm start app-js`
18
- - Run the `app-js` app just to make sure it works
19
- - Make changes to the code
20
- - Re-run `pnpm build` and `pnpm start` (in all its configurations) to make sure the changes work
21
- - Check your work and PR
22
-
23
- # Testing combinations
24
-
25
- These must all product running applications that can be built (`pnpm build`) and tested (`pnpm test`).
26
-
27
- | Command | Description |
28
- | -------------------------------------------------------- | ------------------------------------------------------------------ |
29
- | `pnpm start app-js` | Creates a JavaScript app |
30
- | `pnpm start app-ts --template typescript` | Creates a TypeScript app |
31
- | `pnpm start app-js-tw --tailwind` | Creates a JavaScript app with Tailwind CSS |
32
- | `pnpm start app-ts-tw --template typescript --tailwind` | Creates a TypeScript app with Tailwind CSS |
33
- | `pnpm start app-fr --template file-router` | Creates a TypeScript app with File Based Routing |
34
- | `pnpm start app-fr-tw --template file-router --tailwind` | Creates a TypeScript app with File Based Routing with Tailwind CSS |
package/dist/add-ons.js DELETED
@@ -1,69 +0,0 @@
1
- import { readFile } from 'node:fs/promises';
2
- import { existsSync, readdirSync, statSync } from 'node:fs';
3
- import { resolve } from 'node:path';
4
- import { fileURLToPath } from 'node:url';
5
- import chalk from 'chalk';
6
- import { DEFAULT_FRAMEWORK } from './constants.js';
7
- function isDirectory(path) {
8
- return statSync(path).isDirectory();
9
- }
10
- export async function getAllAddOns(framework, template) {
11
- const addOns = [];
12
- for (const type of ['add-on', 'example']) {
13
- const addOnsBase = fileURLToPath(new URL(`../templates/${framework}/${type}`, import.meta.url));
14
- if (!existsSync(addOnsBase)) {
15
- continue;
16
- }
17
- for (const dir of await readdirSync(addOnsBase).filter((file) => isDirectory(resolve(addOnsBase, file)))) {
18
- const filePath = resolve(addOnsBase, dir, 'info.json');
19
- const fileContent = await readFile(filePath, 'utf-8');
20
- const info = JSON.parse(fileContent);
21
- if (!info.templates.includes(template)) {
22
- continue;
23
- }
24
- let packageAdditions = {};
25
- if (existsSync(resolve(addOnsBase, dir, 'package.json'))) {
26
- packageAdditions = JSON.parse(await readFile(resolve(addOnsBase, dir, 'package.json'), 'utf-8'));
27
- }
28
- let readme;
29
- if (existsSync(resolve(addOnsBase, dir, 'README.md'))) {
30
- readme = await readFile(resolve(addOnsBase, dir, 'README.md'), 'utf-8');
31
- }
32
- addOns.push({
33
- ...info,
34
- id: dir,
35
- type,
36
- directory: resolve(addOnsBase, dir),
37
- packageAdditions,
38
- readme,
39
- });
40
- }
41
- }
42
- return addOns;
43
- }
44
- // Turn the list of chosen add-on IDs into a final list of add-ons by resolving dependencies
45
- export async function finalizeAddOns(framework, template, chosenAddOnIDs) {
46
- const finalAddOnIDs = new Set(chosenAddOnIDs);
47
- const addOns = await getAllAddOns(framework, template);
48
- for (const addOnID of finalAddOnIDs) {
49
- const addOn = addOns.find((a) => a.id === addOnID);
50
- if (!addOn) {
51
- throw new Error(`Add-on ${addOnID} not found`);
52
- }
53
- for (const dependsOn of addOn.dependsOn || []) {
54
- const dep = addOns.find((a) => a.id === dependsOn);
55
- if (!dep) {
56
- throw new Error(`Dependency ${dependsOn} not found`);
57
- }
58
- finalAddOnIDs.add(dep.id);
59
- }
60
- }
61
- return [...finalAddOnIDs].map((id) => addOns.find((a) => a.id === id));
62
- }
63
- export async function listAddOns(options) {
64
- const mode = options.template === 'file-router' ? 'file-router' : 'code-router';
65
- const addOns = await getAllAddOns(options.framework || DEFAULT_FRAMEWORK, mode);
66
- for (const addOn of addOns) {
67
- console.log(`${chalk.bold(addOn.id)}: ${addOn.description}`);
68
- }
69
- }
package/dist/cli.js DELETED
@@ -1,89 +0,0 @@
1
- import { Command, InvalidArgumentError } from 'commander';
2
- import { intro, log } from '@clack/prompts';
3
- import { createApp } from './create-app.js';
4
- import { normalizeOptions, promptForOptions } from './options.js';
5
- import { SUPPORTED_PACKAGE_MANAGERS } from './package-manager.js';
6
- import { SUPPORTED_TOOLCHAINS } from './toolchain.js';
7
- import runServer from './mcp.js';
8
- import { listAddOns } from './add-ons.js';
9
- import { DEFAULT_FRAMEWORK, SUPPORTED_FRAMEWORKS } from './constants.js';
10
- import { createDefaultEnvironment } from './environment.js';
11
- export function cli() {
12
- const program = new Command();
13
- program
14
- .name('create-tsrouter-app')
15
- .description('CLI to create a new TanStack application')
16
- .argument('[project-name]', 'name of the project')
17
- .option('--no-git', 'do not create a git repository')
18
- .option('--framework <type>', 'project framework (solid, react)', (value) => {
19
- if (!SUPPORTED_FRAMEWORKS.includes(value)) {
20
- throw new InvalidArgumentError(`Invalid framework: ${value}. Only the following are allowed: ${SUPPORTED_FRAMEWORKS.join(', ')}`);
21
- }
22
- return value;
23
- }, DEFAULT_FRAMEWORK)
24
- .option('--template <type>', 'project template (typescript, javascript, file-router)', (value) => {
25
- if (value !== 'typescript' &&
26
- value !== 'javascript' &&
27
- value !== 'file-router') {
28
- throw new InvalidArgumentError(`Invalid template: ${value}. Only the following are allowed: typescript, javascript, file-router`);
29
- }
30
- return value;
31
- })
32
- .option(`--package-manager <${SUPPORTED_PACKAGE_MANAGERS.join('|')}>`, `Explicitly tell the CLI to use this package manager`, (value) => {
33
- if (!SUPPORTED_PACKAGE_MANAGERS.includes(value)) {
34
- throw new InvalidArgumentError(`Invalid package manager: ${value}. The following are allowed: ${SUPPORTED_PACKAGE_MANAGERS.join(', ')}`);
35
- }
36
- return value;
37
- })
38
- .option(`--toolchain <${SUPPORTED_TOOLCHAINS.join('|')}>`, `Explicitly tell the CLI to use this toolchain`, (value) => {
39
- if (!SUPPORTED_TOOLCHAINS.includes(value)) {
40
- throw new InvalidArgumentError(`Invalid toolchain: ${value}. The following are allowed: ${SUPPORTED_TOOLCHAINS.join(', ')}`);
41
- }
42
- return value;
43
- })
44
- .option('--tailwind', 'add Tailwind CSS', false)
45
- .option('--add-ons [...add-ons]', 'pick from a list of available add-ons (comma separated list)', (value) => {
46
- let addOns = !!value;
47
- if (typeof value === 'string') {
48
- addOns = value.split(',').map((addon) => addon.trim());
49
- }
50
- return addOns;
51
- })
52
- .option('--list-add-ons', 'list all available add-ons', false)
53
- .option('--mcp', 'run the MCP server', false)
54
- .option('--mcp-sse', 'run the MCP server in SSE mode', false)
55
- .action(async (projectName, options) => {
56
- if (options.listAddOns) {
57
- await listAddOns(options);
58
- }
59
- else if (options.mcp || options.mcpSse) {
60
- await runServer(!!options.mcpSse);
61
- }
62
- else {
63
- try {
64
- const cliOptions = {
65
- projectName,
66
- ...options,
67
- };
68
- let finalOptions = await normalizeOptions(cliOptions);
69
- if (finalOptions) {
70
- intro(`Creating a new TanStack app in ${projectName}...`);
71
- }
72
- else {
73
- intro("Let's configure your TanStack application");
74
- finalOptions = await promptForOptions(cliOptions);
75
- }
76
- await createApp(finalOptions, {
77
- environment: createDefaultEnvironment(),
78
- });
79
- }
80
- catch (error) {
81
- log.error(error instanceof Error
82
- ? error.message
83
- : 'An unknown error occurred');
84
- process.exit(1);
85
- }
86
- }
87
- });
88
- program.parse();
89
- }
package/dist/constants.js DELETED
@@ -1,4 +0,0 @@
1
- export const CODE_ROUTER = 'code-router';
2
- export const FILE_ROUTER = 'file-router';
3
- export const SUPPORTED_FRAMEWORKS = ['solid', 'react'];
4
- export const DEFAULT_FRAMEWORK = 'react';