|
2 | 2 |
|
3 | 3 | This CLI applications builds Tanstack Start applications that are the functional equivalent of [Create React App](https://create-react-app.dev/).
|
4 | 4 |
|
5 |
| -# Development |
| 5 | +To help accelerate the migration away from create-react-app we created the create-tsrouter-app CLI which is a plug-n-play replacement for CRA. |
| 6 | + |
| 7 | +Instead of: |
| 8 | + |
| 9 | +```bash |
| 10 | +npx create-react-app my-app |
| 11 | +``` |
| 12 | + |
| 13 | +You can now run: |
6 | 14 |
|
7 | 15 | ```bash
|
8 |
| -pnpm i |
9 |
| -pnpm build |
| 16 | +npx create-tsrouter-app my-app |
10 | 17 | ```
|
11 | 18 |
|
12 |
| -# Manual testing |
| 19 | +Instead of using: |
| 20 | + |
| 21 | +```bash |
| 22 | +npx create-react-app my-app --template typescript |
| 23 | +``` |
| 24 | + |
| 25 | +To create a SPA application using TypeScript. You can now run: |
| 26 | + |
| 27 | +```bash |
| 28 | +npx create-tsrouter-app my-app --template typescript |
| 29 | +``` |
| 30 | + |
| 31 | +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`. |
| 32 | + |
| 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). |
| 34 | + |
| 35 | +If you want Tailwind then just add `--tailwind`. |
| 36 | + |
| 37 | +You can also specify your preferred package manager with `--package-manager` such as `npm`, `bun`, `yarn`, or `pnpm`. |
| 38 | + |
| 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 [React-Store](https://tanstack.com/store/latest) be found in the generated `README.md` for your project. |
| 40 | + |
| 41 | +# Contributing |
| 42 | + |
| 43 | +Check out the [Contributing](CONTRIBUTING.md) guide. |
13 | 44 |
|
14 |
| -| Command | Description | |
15 |
| -| ------------------------------------------------------- | ------------------------------------------ | |
16 |
| -| `pnpm start app-js` | Creates a JavaScript app | |
17 |
| -| `pnpm start app-ts --template typescript` | Creates a TypeScript app | |
18 |
| -| `pnpm start app-js-tw --tailwind` | Creates a JavaScript app with Tailwind CSS | |
19 |
| -| `pnpm start app-ts-tw --template typescript --tailwind` | Creates a TypeScript app with Tailwind CSS | |
| 45 | +# License |
20 | 46 |
|
21 |
| -There is also `--package-manager pnpm` that will use [pnpm](https://pnpm.io/) as the package manager (this supports `yarn`, `bun`, and `npm` as well). |
| 47 | +MIT |
0 commit comments