create-start-app 0.1.2

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 (44) hide show
  1. package/.gitattributes +2 -0
  2. package/.github/FUNDING.yml +1 -0
  3. package/.github/ISSUE_TEMPLATE/bug_report.yml +94 -0
  4. package/.github/ISSUE_TEMPLATE/config.yml +11 -0
  5. package/.github/workflows/auto.yml +46 -0
  6. package/.github/workflows/ci.yml +43 -0
  7. package/.nvmrc +1 -0
  8. package/.prettierignore +3 -0
  9. package/CONTRIBUTING.md +34 -0
  10. package/LICENSE +21 -0
  11. package/README.md +51 -0
  12. package/dist/index.js +199 -0
  13. package/dist/utils/getPackageManager.js +15 -0
  14. package/eslint.config.js +35 -0
  15. package/package.json +48 -0
  16. package/prettier.config.js +10 -0
  17. package/scripts/publish.js +33 -0
  18. package/src/index.ts +335 -0
  19. package/src/utils/getPackageManager.ts +22 -0
  20. package/templates/base/.vscode/settings.json +11 -0
  21. package/templates/base/README.md.ejs +530 -0
  22. package/templates/base/gitignore +5 -0
  23. package/templates/base/index.html.ejs +20 -0
  24. package/templates/base/package.json +28 -0
  25. package/templates/base/package.ts.json +7 -0
  26. package/templates/base/package.tw.json +6 -0
  27. package/templates/base/public/favicon.ico +0 -0
  28. package/templates/base/public/logo192.png +0 -0
  29. package/templates/base/public/logo512.png +0 -0
  30. package/templates/base/public/manifest.json +25 -0
  31. package/templates/base/public/robots.txt +3 -0
  32. package/templates/base/src/App.css +38 -0
  33. package/templates/base/src/App.test.tsx.ejs +10 -0
  34. package/templates/base/src/App.tsx.ejs +74 -0
  35. package/templates/base/src/logo.svg +43 -0
  36. package/templates/base/src/reportWebVitals.ts.ejs +28 -0
  37. package/templates/base/src/styles.css.ejs +15 -0
  38. package/templates/base/tsconfig.json +24 -0
  39. package/templates/base/vite.config.js.ejs +15 -0
  40. package/templates/code-router/src/main.tsx.ejs +61 -0
  41. package/templates/file-router/package.fr.json +5 -0
  42. package/templates/file-router/src/main.tsx.ejs +35 -0
  43. package/templates/file-router/src/routes/__root.tsx +11 -0
  44. package/tsconfig.json +15 -0
@@ -0,0 +1,530 @@
1
+ Welcome to your new TanStack app!
2
+
3
+ # Getting Started
4
+
5
+ To run this application:
6
+
7
+ ```bash
8
+ <%= packageManager %> install
9
+ <%= packageManager %> start
10
+ ```
11
+
12
+ # Building For Production
13
+
14
+ To build this application for production:
15
+
16
+ ```bash
17
+ <%= packageManager %> run build
18
+ ```
19
+
20
+ ## Testing
21
+
22
+ This project uses [Vitest](https://vitest.dev/) for testing. You can run the tests with:
23
+
24
+ ```bash
25
+ <%= packageManager %> run test
26
+ ```
27
+
28
+ ## Styling
29
+ <% if (tailwind) { %>
30
+ This project uses [Tailwind CSS](https://tailwindcss.com/) for styling.
31
+ <% } else { %>
32
+ This project uses CSS for styling.
33
+ <% } %>
34
+ ## Routing
35
+ <% if (fileRouter) { %>This project uses [TanStack Router](https://tanstack.com/router). The initial setup is a file based router. Which means that the routes are managed as fiels in `src/routes`.<% } else { %>This project uses [TanStack Router](https://tanstack.com/router). The initial setup is a code based router. Which means that the routes are defined in code (in the `./src/main.<%= jsx %>` file). If you like you can also use a file based routing setup by following the [File Based Routing](https://tanstack.com/router/latest/docs/framework/react/guide/file-based-routing) guide.<% } %>
36
+
37
+ ### Adding A Route
38
+ <% if (fileRouter) { %>
39
+ To add a new route to your application just add another a new file in the `./src/routes` directory.
40
+
41
+ TanStack will automatically generate the content of the route file for you.
42
+ <% } else { %>
43
+ To add a new route to your application just add another `createRoute` call to the `./src/main.<%= jsx %>` file. The example below adds a new `/about`route to the root route.
44
+
45
+ ```tsx
46
+ const aboutRoute = createRoute({
47
+ getParentRoute: () => rootRoute,
48
+ path: "/about",
49
+ component: () => <h1>About</h1>,
50
+ });
51
+ ```
52
+
53
+ You will also need to add the route to the `routeTree` in the `./src/main.<%= jsx %>` file.
54
+
55
+ ```tsx
56
+ const routeTree = rootRoute.addChildren([indexRoute, aboutRoute]);
57
+ ```
58
+
59
+ With this set up you should be able to navigate to `/about` and see the about page.
60
+
61
+ Of course you don't need to implement the About page in the `main.<%= jsx %>` file. You can create that component in another file and import it into the `main.<%= jsx %>` file, then use it in the `component` property of the `createRoute` call, like so:
62
+
63
+ ```tsx
64
+ import About from "./components/About.<%= jsx %>";
65
+
66
+ const aboutRoute = createRoute({
67
+ getParentRoute: () => rootRoute,
68
+ path: "/about",
69
+ component: About,
70
+ });
71
+ ```
72
+
73
+ That is how we have the `App` component set up with the home page.
74
+
75
+ For more information on the options you have when you are creating code based routes check out the [Code Based Routing](https://tanstack.com/router/latest/docs/framework/react/guide/code-based-routing) documentation.
76
+ <% } %>
77
+ Now that you have two routes you can use a `Link` component to navigate between them.
78
+
79
+ ### Adding Links
80
+
81
+ To use SPA (Single Page Application) navigation you will need to import the `Link` component from `@tanstack/react-router`.
82
+
83
+ ```tsx
84
+ import { Link } from "@tanstack/react-router";
85
+ ```
86
+
87
+ Then anywhere in your JSX you can use it like so:
88
+
89
+ ```tsx
90
+ <Link to="/about">About</Link>
91
+ ```
92
+
93
+ This will create a link that will navigate to the `/about` route.
94
+
95
+ More information on the `Link` component can be found in the [Link documentation](https://tanstack.com/router/v1/docs/framework/react/api/router/linkComponent).
96
+
97
+ ### Using A Layout
98
+
99
+ <% if (codeRouter) { %>
100
+ Layouts can be used to wrap the contents of the routes in menus, headers, footers, etc.
101
+
102
+ There is already a layout in the `src/main.<%= jsx %>` file:
103
+
104
+ ```tsx
105
+ const rootRoute = createRootRoute({
106
+ component: () => (
107
+ <>
108
+ <Outlet />
109
+ <TanStackRouterDevtools />
110
+ </>
111
+ ),
112
+ });
113
+ ```
114
+
115
+ You can use the React component specified in the `component` property of the `rootRoute` to wrap the contents of the routes. The `<Outlet />` component is used to render the current route within the body of the layout. For example you could add a header to the layout like so:
116
+
117
+ ```tsx
118
+ import { Link } from "@tanstack/react-router";
119
+
120
+ const rootRoute = createRootRoute({
121
+ component: () => (
122
+ <>
123
+ <header>
124
+ <nav>
125
+ <Link to="/">Home</Link>
126
+ <Link to="/about">About</Link>
127
+ </nav>
128
+ </header>
129
+ <Outlet />
130
+ <TanStackRouterDevtools />
131
+ </>
132
+ ),
133
+ });
134
+ ```
135
+ <% } else { %>In the File Based Routing setup the layout is located in `src/routes/__root.tsx`. Anything you add to the root route will appear in all the routes. The route content will appear in the JSX where you use the `<Outlet />` component.
136
+
137
+ Here is an example layout that includes a header:
138
+
139
+ ```tsx
140
+ import { createRootRoute, Outlet } from '@tanstack/react-router'
141
+ import { TanStackRouterDevtools } from '@tanstack/router-devtools'
142
+
143
+ import { Link } from "@tanstack/react-router";
144
+
145
+ export const Route = createRootRoute({
146
+ component: () => (
147
+ <>
148
+ <header>
149
+ <nav>
150
+ <Link to="/">Home</Link>
151
+ <Link to="/about">About</Link>
152
+ </nav>
153
+ </header>
154
+ <Outlet />
155
+ <TanStackRouterDevtools />
156
+ </>
157
+ ),
158
+ })
159
+ ```
160
+ <% } %>
161
+ The `<TanStackRouterDevtools />` component is not required so you can remove it if you don't want it in your layout.
162
+
163
+ More information on layouts can be found in the [Layouts documentation](hthttps://tanstack.com/router/latest/docs/framework/react/guide/routing-concepts#layouts).
164
+
165
+ <% if (codeRouter) { %>
166
+ ### Migrating To File Base Routing
167
+
168
+ First you need to add the Vite plugin for Tanstack Router:
169
+
170
+ ```bash
171
+ <%= packageManager %> install -D @tanstack/router-plugin
172
+ ```
173
+
174
+ From there you need to update your `vite.config.js` file to use the plugin:
175
+
176
+ ```ts
177
+ import { defineConfig } from "vite";
178
+ import viteReact from "@vitejs/plugin-react";
179
+ import { TanStackRouterVite } from "@tanstack/router-plugin/vite";<% if (tailwind) { %>
180
+ import tailwindcss from "@tailwindcss/vite";
181
+ <% } %>
182
+
183
+ // https://vitejs.dev/config/
184
+ export default defineConfig({
185
+ plugins: [
186
+ TanStackRouterVite(),
187
+ viteReact()<% if (tailwind) { %>,
188
+ tailwindcss()<% } %>
189
+ ],
190
+ });
191
+ ```
192
+
193
+ Now you'll need to rearrange your files a little bit. That starts with creating a `routes` directory in the `src` directory:
194
+
195
+ ```bash
196
+ mkdir src/routes
197
+ ```
198
+
199
+ Then you'll need to create a `src/routes/__root.<%= jsx %>` file with the contents of the root route that was in `main.<%= jsx %>`.
200
+
201
+ ```tsx
202
+ import { createRootRoute, Outlet } from "@tanstack/react-router";
203
+ import { TanStackRouterDevtools } from "@tanstack/router-devtools";
204
+
205
+ export const Route = createRootRoute({
206
+ component: () => (
207
+ <>
208
+ <Outlet />
209
+ <TanStackRouterDevtools />
210
+ </>
211
+ ),
212
+ });
213
+ ```
214
+
215
+ Next up you'll need to move your home route code into `src/routes/index.<%= jsx %>`
216
+
217
+ ```tsx
218
+ import { createFileRoute } from "@tanstack/react-router";
219
+
220
+ import logo from "../logo.svg";
221
+ import "../App.css";
222
+
223
+ export const Route = createFileRoute("/")({
224
+ component: App,
225
+ });
226
+
227
+ function App() {
228
+ return (<% if (tailwind) { %>
229
+ <div className="text-center">
230
+ <header className="min-h-screen flex flex-col items-center justify-center bg-[#282c34] text-white text-[calc(10px+2vmin)]">
231
+ <img
232
+ src={logo}
233
+ className="h-[40vmin] pointer-events-none animate-[spin_20s_linear_infinite]"
234
+ alt="logo"
235
+ />
236
+ <p>
237
+ Edit <code>src/App.tsx</code> and save to reload.
238
+ </p>
239
+ <a
240
+ className="text-[#61dafb] hover:underline"
241
+ href="https://reactjs.org"
242
+ target="_blank"
243
+ rel="noopener noreferrer"
244
+ >
245
+ Learn React
246
+ </a>
247
+ <a
248
+ className="text-[#61dafb] hover:underline"
249
+ href="https://tanstack.com"
250
+ target="_blank"
251
+ rel="noopener noreferrer"
252
+ >
253
+ Learn TanStack
254
+ </a>
255
+ </header>
256
+ </div>
257
+ <% } else { %>
258
+ <div className="App">
259
+ <header className="App-header">
260
+ <img src={logo} className="App-logo" alt="logo" />
261
+ <p>
262
+ Edit <code>src/App.tsx</code> and save to reload.
263
+ </p>
264
+ <a
265
+ className="App-link"
266
+ href="https://reactjs.org"
267
+ target="_blank"
268
+ rel="noopener noreferrer"
269
+ >
270
+ Learn React
271
+ </a>
272
+ <a
273
+ className="App-link"
274
+ href="https://tanstack.com"
275
+ target="_blank"
276
+ rel="noopener noreferrer"
277
+ >
278
+ Learn TanStack
279
+ </a>
280
+ </header>
281
+ </div>
282
+ <% } %> );
283
+ }
284
+ ```
285
+
286
+ At this point you can delete `src/App.<%= jsx %>`, you will no longer need it as the contents have moved into `src/routes/index.<%= jsx %>`.
287
+
288
+ The only additional code is the `createFileRoute` function that tells TanStack Router where to render the route. Helpfully the Vite plugin will keep the path argument that goes to `createFileRoute` automatically in sync with the file system.
289
+
290
+ Finally the `src/main.<%= jsx %>` file can be simplified down to this:
291
+
292
+ ```tsx
293
+ import { StrictMode } from "react";
294
+ import ReactDOM from "react-dom/client";
295
+ import { RouterProvider, createRouter } from "@tanstack/react-router";
296
+
297
+ // Import the generated route tree
298
+ import { routeTree } from "./routeTree.gen";
299
+
300
+ import "./styles.css";
301
+ import reportWebVitals from "./reportWebVitals.<%= js %>";
302
+
303
+ // Create a new router instance
304
+ const router = createRouter({ routeTree });
305
+ <% if (typescript) { %>
306
+ // Register the router instance for type safety
307
+ declare module "@tanstack/react-router" {
308
+ interface Register {
309
+ router: typeof router;
310
+ }
311
+ }
312
+
313
+ // Render the app
314
+ const rootElement = document.getElementById("app")!;
315
+ <% } else { %>
316
+ // Render the app
317
+ const rootElement = document.getElementById("app");
318
+ <% } %>if (!rootElement.innerHTML) {
319
+ const root = ReactDOM.createRoot(rootElement);
320
+ root.render(
321
+ <StrictMode>
322
+ <RouterProvider router={router} />
323
+ </StrictMode>
324
+ );
325
+ }
326
+
327
+ // If you want to start measuring performance in your app, pass a function
328
+ // to log results (for example: reportWebVitals(console.log))
329
+ // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
330
+ reportWebVitals();
331
+ ```
332
+
333
+ Now you've got a file based routing setup in your project! Let's have some fun with it! Just create a file in `about.<%= jsx %>` in `src/routes` and it if the application is running TanStack will automatically add contents to the file and you'll have the start of your `/about` route ready to go with no additional work. You can see why folks find File Based Routing so easy to use.
334
+
335
+ You can find out everything you need to know on how to use file based routing in the [File Based Routing](https://tanstack.com/router/latest/docs/framework/react/guide/file-based-routing) documentation.
336
+ <% } %>
337
+ ## Data Fetching
338
+
339
+ There are multiple ways to fetch data in your application. You can use TanStack Query to fetch data from a server. But you can also use the `loader` functionality built into TanStack Router to load the data for a route before it's rendered.
340
+
341
+ For example:
342
+
343
+ ```tsx
344
+ const peopleRoute = createRoute({
345
+ getParentRoute: () => rootRoute,
346
+ path: "/people",
347
+ loader: async () => {
348
+ const response = await fetch("https://swapi.dev/api/people");<% if (typescript) { %>
349
+ return response.json() as Promise<{
350
+ results: {
351
+ name: string;
352
+ }[];
353
+ }>;
354
+ <% } else { %>
355
+ return response.json();
356
+ <% } %> },
357
+ component: () => {
358
+ const data = peopleRoute.useLoaderData();
359
+ return (
360
+ <ul>
361
+ {data.results.map((person) => (
362
+ <li key={person.name}>{person.name}</li>
363
+ ))}
364
+ </ul>
365
+ );
366
+ },
367
+ });
368
+ ```
369
+
370
+ Loaders simplify your data fetching logic dramatically. Check out more information in the [Loader documentation](https://tanstack.com/router/latest/docs/framework/react/guide/data-loading#loader-parameters).
371
+
372
+ ### React-Query
373
+
374
+ React-Query is an excellent addition or alternative to route loading and integrating it into you application is a breeze.
375
+
376
+ First add your dependencies:
377
+
378
+ ```bash
379
+ <%= packageManager %> install @tanstack/react-query @tanstack/react-query-devtools
380
+ ```
381
+
382
+ Next we'll need to creata query client and provider. We recommend putting those in `main.<%= jsx %>`.
383
+
384
+ ```tsx
385
+ import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
386
+
387
+ // ...
388
+
389
+ const queryClient = new QueryClient();
390
+
391
+ // ...
392
+
393
+ if (!rootElement.innerHTML) {
394
+ const root = ReactDOM.createRoot(rootElement);
395
+
396
+ root.render(
397
+ <QueryClientProvider client={queryClient}>
398
+ <RouterProvider router={router} />
399
+ </QueryClientProvider>
400
+ );
401
+ }
402
+ ```
403
+
404
+ You can also add TanStack Query Devtools to the root route (optional).
405
+
406
+ ```tsx
407
+ import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
408
+
409
+ const rootRoute = createRootRoute({
410
+ component: () => (
411
+ <>
412
+ <Outlet />
413
+ <ReactQueryDevtools buttonPosition="top-right" />
414
+ <TanStackRouterDevtools />
415
+ </>
416
+ ),
417
+ });
418
+ ```
419
+
420
+ Now you can use `useQuery` to fetch your data.
421
+
422
+ ```tsx
423
+ import { useQuery } from "@tanstack/react-query";
424
+
425
+ import "./App.css";
426
+
427
+ function App() {
428
+ const { data } = useQuery({
429
+ queryKey: ["people"],
430
+ queryFn: () =>
431
+ fetch("https://swapi.dev/api/people")
432
+ .then((res) => res.json())<% if (typescript) { %>
433
+ .then((data) => data.results as { name: string }[]),
434
+ <% } else { %>
435
+ .then((data) => data.results),
436
+ <% } %> initialData: [],
437
+ });
438
+
439
+ return (
440
+ <div>
441
+ <ul>
442
+ {data.map((person) => (
443
+ <li key={person.name}>{person.name}</li>
444
+ ))}
445
+ </ul>
446
+ </div>
447
+ );
448
+ }
449
+
450
+ export default App;
451
+ ```
452
+
453
+ You can find out everything you need to know on how to use React-Query in the [React-Query documentation](https://tanstack.com/query/latest/docs/framework/react/overview).
454
+
455
+ ## State Management
456
+
457
+ Another common requirement for React applications is state management. There are many options for state management in React. TanStack Store provides a great starting point for your project.
458
+
459
+ First you need to add TanStack Store as a dependency:
460
+
461
+ ```bash
462
+ <%= packageManager %> install @tanstack/store
463
+ ```
464
+
465
+ Now let's create a simple counter in the `src/App.<%= jsx %>` file as a demonstration.
466
+
467
+ ```tsx
468
+ import { useStore } from "@tanstack/react-store";
469
+ import { Store } from "@tanstack/store";
470
+ import "./App.css";
471
+
472
+ const countStore = new Store(0);
473
+
474
+ function App() {
475
+ const count = useStore(countStore);
476
+ return (
477
+ <div>
478
+ <button onClick={() => countStore.setState((n) => n + 1)}>
479
+ Increment - {count}
480
+ </button>
481
+ </div>
482
+ );
483
+ }
484
+
485
+ export default App;
486
+ ```
487
+
488
+ One of the many nice features of TanStack Store is the ability to derive state from other state. That derived state will update when the base state updates.
489
+
490
+ Let's check this out by doubling the count using derived state.
491
+
492
+ ```tsx
493
+ import { useStore } from "@tanstack/react-store";
494
+ import { Store, Derived } from "@tanstack/store";
495
+ import "./App.css";
496
+
497
+ const countStore = new Store(0);
498
+
499
+ const doubledStore = new Derived({
500
+ fn: () => countStore.state * 2,
501
+ deps: [countStore],
502
+ });
503
+ doubledStore.mount();
504
+
505
+ function App() {
506
+ const count = useStore(countStore);
507
+ const doubledCount = useStore(doubledStore);
508
+
509
+ return (
510
+ <div>
511
+ <button onClick={() => countStore.setState((n) => n + 1)}>
512
+ Increment - {count}
513
+ </button>
514
+ <div>Doubled - {doubledCount}</div>
515
+ </div>
516
+ );
517
+ }
518
+
519
+ export default App;
520
+ ```
521
+
522
+ We use the `Derived` class to create a new store that is derived from another store. The `Derived` class has a `mount` method that will start the derived store updating.
523
+
524
+ Once we've created the derived store we can use it in the `App` component just like we would any other store using the `useStore` hook.
525
+
526
+ You can find out everything you need to know on how to use TanStack Store in the [TanStack Store documentation](https://tanstack.com/store/latest).
527
+
528
+ # Learn More
529
+
530
+ You can learn more about all of the offerings from TanStack in the [TanStack documentation](https://tanstack.com).
@@ -0,0 +1,5 @@
1
+ node_modules
2
+ .DS_Store
3
+ dist
4
+ dist-ssr
5
+ *.local
@@ -0,0 +1,20 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <link rel="icon" href="/favicon.ico" />
7
+ <meta name="theme-color" content="#000000" />
8
+ <meta
9
+ name="description"
10
+ content="Web site created using create-tsrouter-app"
11
+ />
12
+ <link rel="apple-touch-icon" href="/logo192.png" />
13
+ <link rel="manifest" href="/manifest.json" />
14
+ <title>Create TanStack App - <%= projectName %></title>
15
+ </head>
16
+ <body>
17
+ <div id="app"></div>
18
+ <script type="module" src="/src/main.<%= jsx %>"></script>
19
+ </body>
20
+ </html>
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "",
3
+ "private": true,
4
+ "type": "module",
5
+ "scripts": {
6
+ "start": "vite --port 3000",
7
+ "build": "vite build && tsc",
8
+ "serve": "vite preview",
9
+ "test": "vitest run"
10
+ },
11
+ "dependencies": {
12
+ "@tanstack/react-router": "^1.104.1",
13
+ "@tanstack/router-devtools": "^1.104.3",
14
+ "react": "^19.0.0",
15
+ "react-dom": "^19.0.0"
16
+ },
17
+ "devDependencies": {
18
+ "@testing-library/react": "^16.2.0",
19
+ "@types/react": "^19.0.8",
20
+ "@types/react-dom": "^19.0.3",
21
+ "@vitejs/plugin-react": "^4.3.4",
22
+ "jsdom": "^26.0.0",
23
+ "typescript": "^5.7.2",
24
+ "vite": "^6.1.0",
25
+ "vitest": "^3.0.5",
26
+ "web-vitals": "^4.2.4"
27
+ }
28
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "devDependencies": {
3
+ "@types/react": "^19.0.8",
4
+ "@types/react-dom": "^19.0.3",
5
+ "typescript": "^5.7.2"
6
+ }
7
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "dependencies": {
3
+ "@tailwindcss/vite": "^4.0.6",
4
+ "tailwindcss": "^4.0.6"
5
+ }
6
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "short_name": "TanStack App",
3
+ "name": "Create TanStack App Sample",
4
+ "icons": [
5
+ {
6
+ "src": "favicon.ico",
7
+ "sizes": "64x64 32x32 24x24 16x16",
8
+ "type": "image/x-icon"
9
+ },
10
+ {
11
+ "src": "logo192.png",
12
+ "type": "image/png",
13
+ "sizes": "192x192"
14
+ },
15
+ {
16
+ "src": "logo512.png",
17
+ "type": "image/png",
18
+ "sizes": "512x512"
19
+ }
20
+ ],
21
+ "start_url": ".",
22
+ "display": "standalone",
23
+ "theme_color": "#000000",
24
+ "background_color": "#ffffff"
25
+ }
@@ -0,0 +1,3 @@
1
+ # https://www.robotstxt.org/robotstxt.html
2
+ User-agent: *
3
+ Disallow:
@@ -0,0 +1,38 @@
1
+ .App {
2
+ text-align: center;
3
+ }
4
+
5
+ .App-logo {
6
+ height: 40vmin;
7
+ pointer-events: none;
8
+ }
9
+
10
+ @media (prefers-reduced-motion: no-preference) {
11
+ .App-logo {
12
+ animation: App-logo-spin infinite 20s linear;
13
+ }
14
+ }
15
+
16
+ .App-header {
17
+ background-color: #282c34;
18
+ min-height: 100vh;
19
+ display: flex;
20
+ flex-direction: column;
21
+ align-items: center;
22
+ justify-content: center;
23
+ font-size: calc(10px + 2vmin);
24
+ color: white;
25
+ }
26
+
27
+ .App-link {
28
+ color: #61dafb;
29
+ }
30
+
31
+ @keyframes App-logo-spin {
32
+ from {
33
+ transform: rotate(0deg);
34
+ }
35
+ to {
36
+ transform: rotate(360deg);
37
+ }
38
+ }
@@ -0,0 +1,10 @@
1
+ import { describe, expect, test } from "vitest";
2
+ import { render, screen } from "@testing-library/react";
3
+ import App from "./App.<%= jsx %>";
4
+
5
+ describe("App", () => {
6
+ test("renders", () => {
7
+ render(<App />);
8
+ expect(screen.getByText("Learn React")).toBeDefined();
9
+ });
10
+ });