You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`--template <type>`: Choose between `file-router`, `typescript`, or `javascript`
45
+
-`--tailwind`: Enable Tailwind CSS
46
+
-`--package-manager`: Specify your preferred package manager (`npm`, `yarn`, `pnpm`, or `bun`)
47
+
-`--no-git`: Do not initialize a git repository
48
+
49
+
When using flags, the CLI will display which options were provided and only prompt for the remaining choices.
50
+
51
+
## Features
52
+
53
+
What you'll get is a Vite application that uses TanStack Router. All the files will still be in the same place as in CRA, but you'll get a fully functional Router setup under in `app/main.tsx`.
54
+
55
+
`create-tsrouter-app` is everything you loved about CRA but implemented with modern tools and best practices, on top of the popular TanStack set of libraries. Which includes [@tanstack/react-query](https://tanstack.com/query/latest) and [@tanstack/react-router](https://tanstack.com/router/latest).
56
+
57
+
## Routing Options
58
+
59
+
### File Based Routing (Recommended)
60
+
61
+
File Based Routing is the default option when using the interactive CLI. The location of the home page will be `app/routes/index.tsx`. This approach provides a more intuitive and maintainable way to structure your routes.
To create a SPA application using TypeScript. You can now run:
69
+
### Code Based Routing
70
+
71
+
If you prefer traditional code-based routing, you can select it in the interactive CLI or specify it by using either the `typescript` or `javascript` template:
What you'll get is a Vite application that uses TanStack Router. All the files will still be in the same place as in CRA, but you'll get a fully functional Router setup under in `app/main.tsx`.
77
+
## Additional Configuration
32
78
33
-
`create-tsrouter-app` is everything you loved about CRA but implemented with modern tools and best practices, on top of the popular TanStack set of libraries. Which includes [@tanstack/react-query](https://tanstack.com/query/latest) and [@tanstack/react-router](https://tanstack.com/router/latest).
79
+
### TypeScript
80
+
81
+
- File Based Routing always uses TypeScript
82
+
- For Code Based Routing, you can choose between TypeScript and JavaScript
83
+
- Enable TypeScript explicitly with `--template typescript`
34
84
35
-
If you want Tailwind then just add `--tailwind` and that will automatically configure [Tailwind V4](https://tailwindcss.com/).
85
+
### Tailwind CSS
36
86
37
-
You can also specify your preferred package manager with `--package-manager` such as `npm`, `bun`, `yarn`, or `pnpm`.
87
+
Enable Tailwind CSS either through the interactive CLI or by adding the `--tailwind` flag. This will automatically configure [Tailwind V4](https://tailwindcss.com/).
38
88
39
-
Extensive documentation on using the TanStack Router, migrating to a File Base Routing approach, as well as integrating [@tanstack/react-query](https://tanstack.com/query/latest) and [@tanstack/store](https://tanstack.com/store/latest) be found in the generated `README.md` for your project.
89
+
### Package Manager
40
90
41
-
## File Based Routing
91
+
Choose your preferred package manager (`npm`, `bun`, `yarn`, or `pnpm`) either through the interactive CLI or using the `--package-manager` flag.
42
92
43
-
By default `create-tsrouter-app` will create a Code Based Routing application. If you want to use File Based Routing then you can specify `--template file-router`. The location of the home page will be `app/routes/index.tsx`.
93
+
Extensive documentation on using the TanStack Router, migrating to a File Base Routing approach, as well as integrating [@tanstack/react-query](https://tanstack.com/query/latest) and [@tanstack/store](https://tanstack.com/store/latest) can be found in the generated `README.md` for your project.
0 commit comments