create-start-app 0.4.0 → 0.4.1

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/README.md CHANGED
@@ -124,6 +124,18 @@ npx create-tsrouter-app@latest --list-add-ons --framework solid --template file-
124
124
 
125
125
  Will get you a list of all available add-ons for Solid that are compatible with the File Router.
126
126
 
127
+ ## MCP (Model Context Protocol) Support (experimental)
128
+
129
+ You can launch the `create-tsrouter-app` CLI with the `--mcp` flag to enable MCP support. Use this in your MCP enabled IDE to allow the Agent model to generate TanStack Router applications.
130
+
131
+ ```bash
132
+ npx create-tsrouter-app@latest --mcp
133
+ ```
134
+
135
+ Shown below is the configuration for MCP support in Cursor.
136
+
137
+ ![MCP Configuration](./images/mcp-configuration.png)
138
+
127
139
  # Contributing
128
140
 
129
141
  Check out the [Contributing](CONTRIBUTING.md) guide.
package/dist/options.js CHANGED
@@ -5,7 +5,7 @@ import { finalizeAddOns, getAllAddOns } from './add-ons.js';
5
5
  // If all CLI options are provided, use them directly
6
6
  export async function normalizeOptions(cliOptions) {
7
7
  if (cliOptions.projectName) {
8
- const typescript = cliOptions.template === 'typescript' ||
8
+ let typescript = cliOptions.template === 'typescript' ||
9
9
  cliOptions.template === 'file-router' ||
10
10
  cliOptions.framework === 'solid';
11
11
  let tailwind = !!cliOptions.tailwind;
@@ -18,6 +18,7 @@ export async function normalizeOptions(cliOptions) {
18
18
  addOns = true;
19
19
  chosenAddOns = await finalizeAddOns(cliOptions.framework || DEFAULT_FRAMEWORK, cliOptions.template === 'file-router' ? FILE_ROUTER : CODE_ROUTER, cliOptions.addOns);
20
20
  tailwind = true;
21
+ typescript = true;
21
22
  }
22
23
  return {
23
24
  framework: cliOptions.framework || 'react',
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-start-app",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Tanstack Application Builder",
5
5
  "bin": "./dist/index.js",
6
6
  "type": "module",
package/src/options.ts CHANGED
@@ -23,7 +23,7 @@ export async function normalizeOptions(
23
23
  cliOptions: CliOptions,
24
24
  ): Promise<Required<Options> | undefined> {
25
25
  if (cliOptions.projectName) {
26
- const typescript =
26
+ let typescript =
27
27
  cliOptions.template === 'typescript' ||
28
28
  cliOptions.template === 'file-router' ||
29
29
  cliOptions.framework === 'solid'
@@ -43,6 +43,7 @@ export async function normalizeOptions(
43
43
  cliOptions.addOns,
44
44
  )
45
45
  tailwind = true
46
+ typescript = true
46
47
  }
47
48
 
48
49
  return {
@@ -306,7 +306,7 @@ import "./styles.css";
306
306
  import reportWebVitals from "./reportWebVitals.<%= js %>";
307
307
 
308
308
  // Create a new router instance
309
- const router = createRouter({ routeTree });
309
+ const router = createRouter({ routeTree, defaultPreload: "intent", scrollRestoration: true, defaultStructuralSharing: true });
310
310
  <% if (typescript) { %>
311
311
  // Register the router instance for type safety
312
312
  declare module "@tanstack/react-router" {
@@ -51,6 +51,7 @@ const router = createRouter({
51
51
  routeTree,
52
52
  defaultPreload: "intent",
53
53
  scrollRestoration: true,
54
+ defaultStructuralSharing: true,
54
55
  });
55
56
  <% if (typescript) { %>
56
57
  declare module "@tanstack/react-router" {
@@ -9,7 +9,7 @@ import "./styles.css";
9
9
  import reportWebVitals from "./reportWebVitals.<%= js %>";
10
10
 
11
11
  // Create a new router instance
12
- const router = createRouter({ routeTree });
12
+ const router = createRouter({ routeTree, defaultPreload: "intent", scrollRestoration: true, defaultStructuralSharing: true });
13
13
 
14
14
  // Register the router instance for type safety
15
15
  declare module "@tanstack/react-router" {