create-tsrouter-app 0.1.1 → 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.
package/dist/index.js CHANGED
@@ -145,7 +145,7 @@ async function createApp(projectName, options) {
145
145
  await templateFile(templateDirBase, './index.html.ejs');
146
146
  // Setup tsconfig
147
147
  if (options.typescript) {
148
- await copyFiles(templateDirBase, ['./tsconfig.json', './tsconfig.dev.json']);
148
+ await copyFiles(templateDirBase, ['./tsconfig.json']);
149
149
  }
150
150
  // Setup the package.json file, optionally with typescript and tailwind
151
151
  await createPackageJSON(projectName, options, templateDirBase, templateDirRouter, targetDir);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-tsrouter-app",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Tanstack Application Builder",
5
5
  "bin": "./dist/index.js",
6
6
  "type": "module",
package/src/index.ts CHANGED
@@ -236,7 +236,7 @@ async function createApp(projectName: string, options: Required<Options>) {
236
236
 
237
237
  // Setup tsconfig
238
238
  if (options.typescript) {
239
- await copyFiles(templateDirBase, ['./tsconfig.json', './tsconfig.dev.json'])
239
+ await copyFiles(templateDirBase, ['./tsconfig.json'])
240
240
  }
241
241
 
242
242
  // Setup the package.json file, optionally with typescript and tailwind
@@ -61,7 +61,7 @@ With this set up you should be able to navigate to `/about` and see the about pa
61
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
62
 
63
63
  ```tsx
64
- import About from "./components/About";
64
+ import About from "./components/About.<%= jsx %>";
65
65
 
66
66
  const aboutRoute = createRoute({
67
67
  getParentRoute: () => rootRoute,
@@ -298,7 +298,7 @@ import { RouterProvider, createRouter } from "@tanstack/react-router";
298
298
  import { routeTree } from "./routeTree.gen";
299
299
 
300
300
  import "./styles.css";
301
- import reportWebVitals from "./reportWebVitals";
301
+ import reportWebVitals from "./reportWebVitals.<%= js %>";
302
302
 
303
303
  // Create a new router instance
304
304
  const router = createRouter({ routeTree });
@@ -4,7 +4,7 @@
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "start": "vite --port 3000",
7
- "build": "vite build && tsc --noEmit",
7
+ "build": "vite build && tsc",
8
8
  "serve": "vite preview",
9
9
  "test": "vitest run"
10
10
  },
@@ -1,6 +1,6 @@
1
1
  {
2
- "short_name": "React App",
3
- "name": "Create React App Sample",
2
+ "short_name": "TanStack App",
3
+ "name": "Create TanStack App Sample",
4
4
  "icons": [
5
5
  {
6
6
  "src": "favicon.ico",
@@ -1,6 +1,6 @@
1
1
  import { describe, expect, test } from "vitest";
2
2
  import { render, screen } from "@testing-library/react";
3
- import App from "./App";
3
+ import App from "./App.<%= jsx %>";
4
4
 
5
5
  describe("App", () => {
6
6
  test("renders", () => {
@@ -1,10 +1,24 @@
1
1
  {
2
+ "include": ["**/*.ts", "**/*.tsx"],
2
3
  "compilerOptions": {
3
- "strict": true,
4
- "types": ["vite/client", "node"],
5
- "esModuleInterop": true,
4
+ "target": "ES2022",
6
5
  "jsx": "react-jsx",
7
- "lib": ["DOM", "DOM.Iterable", "ES2022"],
8
- "skipLibCheck": true
6
+ "module": "ESNext",
7
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
8
+ "types": ["vite/client"],
9
+
10
+ /* Bundler mode */
11
+ "moduleResolution": "bundler",
12
+ "allowImportingTsExtensions": true,
13
+ "verbatimModuleSyntax": true,
14
+ "noEmit": true,
15
+
16
+ /* Linting */
17
+ "skipLibCheck": true,
18
+ "strict": true,
19
+ "noUnusedLocals": true,
20
+ "noUnusedParameters": true,
21
+ "noFallthroughCasesInSwitch": true,
22
+ "noUncheckedSideEffectImports": true
9
23
  }
10
24
  }
@@ -10,9 +10,9 @@ import {
10
10
  import { TanStackRouterDevtools } from "@tanstack/router-devtools";
11
11
 
12
12
  import "./styles.css";
13
- import reportWebVitals from "./reportWebVitals";
13
+ import reportWebVitals from "./reportWebVitals.<%= js %>";
14
14
 
15
- import App from "./App";
15
+ import App from "./App.<%= jsx %>";
16
16
 
17
17
  const rootRoute = createRootRoute({
18
18
  component: () => (
@@ -6,7 +6,7 @@ import { RouterProvider, createRouter } from "@tanstack/react-router";
6
6
  import { routeTree } from "./routeTree.gen";
7
7
 
8
8
  import "./styles.css";
9
- import reportWebVitals from "./reportWebVitals";
9
+ import reportWebVitals from "./reportWebVitals.<%= js %>";
10
10
 
11
11
  // Create a new router instance
12
12
  const router = createRouter({ routeTree });
@@ -1,10 +0,0 @@
1
- {
2
- "composite": true,
3
- "extends": "../../../tsconfig.base.json",
4
-
5
- "files": ["src/main.tsx"],
6
- "include": [
7
- "src"
8
- // "__tests__/**/*.test.*"
9
- ]
10
- }