Skip to content

Commit c413e32

Browse files
committed
chore: split to monorepo to prep for create-start-appp
1 parent 3d27e4d commit c413e32

File tree

245 files changed

+1068
-96
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

245 files changed

+1068
-96
lines changed

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,10 @@ dist
33
app-*
44
my-app
55
.DS_Store
6+
**/node_modules
7+
**/dist
68

7-
.vscode
9+
.vscode
10+
11+
.nx/cache
12+
.nx/workspace-data
File renamed without changes.
File renamed without changes.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "create-tsrouter-app",
3+
"version": "0.11.0-alpha.2",
4+
"description": "Tanstack Application Builder",
5+
"bin": "./dist/index.js",
6+
"type": "module",
7+
"scripts": {
8+
"build": "tsc"
9+
},
10+
"repository": {
11+
"type": "git",
12+
"url": "https://github.com/TanStack/create-tsrouter-app.git"
13+
},
14+
"homepage": "https://tanstack.com/router",
15+
"funding": {
16+
"type": "github",
17+
"url": "https://github.com/sponsors/tannerlinsley"
18+
},
19+
"keywords": [
20+
"react",
21+
"tanstack",
22+
"router",
23+
"create-react-app"
24+
],
25+
"author": "Jack Herrington <[email protected]>",
26+
"license": "MIT",
27+
"packageManager": "[email protected]",
28+
"dependencies": {
29+
"engine": "workspace:*"
30+
},
31+
"devDependencies": {
32+
"@types/node": "^22.13.4",
33+
"typescript": "^5.6.3"
34+
}
35+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env node
2+
import { cli } from 'engine'
3+
4+
cli()
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "../../tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "./dist",
5+
"rootDir": "./src"
6+
},
7+
"include": ["./src/**/*.ts"],
8+
"exclude": ["node_modules", "dist"]
9+
}

nx.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"$schema": "./node_modules/nx/schemas/nx-schema.json"
3+
}

package.json

Lines changed: 18 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,36 @@
11
{
2-
"name": "create-tsrouter-app",
3-
"version": "0.11.0-alpha.2",
2+
"name": "tanstack-app-creators",
43
"description": "Tanstack Application Builder",
54
"bin": "./dist/index.js",
65
"type": "module",
76
"scripts": {
8-
"build": "tsc",
9-
"start": "tsc && node dist/index.js",
10-
"test": "npm run test:lint && vitest --run",
11-
"test:watch": "vitest",
7+
"build": "nx run-many -t build",
128
"cipublish": "node scripts/publish.js",
13-
"test:lint": "eslint ./src",
14-
"mcp": "tsc && npx @modelcontextprotocol/inspector dist/index.js --mcp"
9+
"test": "nx run-many -t test"
1510
},
1611
"repository": {
1712
"type": "git",
1813
"url": "https://github.com/TanStack/create-tsrouter-app.git"
1914
},
20-
"homepage": "https://tanstack.com/router",
21-
"funding": {
22-
"type": "github",
23-
"url": "https://github.com/sponsors/tannerlinsley"
24-
},
25-
"keywords": [
26-
"react",
27-
"tanstack",
28-
"router",
29-
"create-react-app"
30-
],
31-
"author": "Jack Herrington <[email protected]>",
32-
"license": "MIT",
33-
"packageManager": "[email protected]",
34-
"dependencies": {
35-
"@clack/prompts": "^0.10.0",
36-
"@modelcontextprotocol/sdk": "^1.6.0",
37-
"chalk": "^5.4.1",
38-
"commander": "^13.1.0",
39-
"ejs": "^3.1.10",
40-
"execa": "^9.5.2",
41-
"express": "^4.21.2",
42-
"memfs": "^4.17.0",
43-
"prettier": "^3.5.0",
44-
"vitest": "^3.0.8",
45-
"zod": "^3.24.2"
46-
},
4715
"devDependencies": {
4816
"@tanstack/config": "^0.16.2",
49-
"@types/ejs": "^3.1.5",
50-
"@types/express": "^5.0.0",
51-
"@types/node": "^22.13.4",
5217
"eslint": "^9.20.0",
5318
"eslint-plugin-react-hooks": "^5.1.0",
5419
"eslint-plugin-unused-imports": "^4.1.4",
20+
"nx": "20.6.4",
5521
"typescript": "^5.6.3"
22+
},
23+
"pnpm": {
24+
"overrides": {
25+
"create-tsrouter-app": "link:cli/create-tsrouter-app"
26+
}
27+
},
28+
"workspaces": [
29+
"./cli/*",
30+
"./packages/*"
31+
],
32+
"dependencies": {
33+
"@tanstack/config": "^0.16.2",
34+
"create-tsrouter-app": "link:cli/create-tsrouter-app"
5635
}
57-
}
36+
}

packages/engine/package.json

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"name": "engine",
3+
"version": "0.11.0-alpha.2",
4+
"description": "Tanstack Application Builder Engine",
5+
"type": "module",
6+
"main": "./dist/index.js",
7+
"types": "./dist/types/index.d.ts",
8+
"scripts": {
9+
"build": "tsc",
10+
"dev": "tsc --watch",
11+
"test": "npm run test:lint && vitest --run",
12+
"test:watch": "vitest",
13+
"cipublish": "node scripts/publish.js",
14+
"test:lint": "eslint ./src",
15+
"mcp": "tsc && npx @modelcontextprotocol/inspector dist/index.js --mcp"
16+
},
17+
"repository": {
18+
"type": "git",
19+
"url": "https://github.com/TanStack/create-tsrouter-app.git"
20+
},
21+
"homepage": "https://tanstack.com/router",
22+
"funding": {
23+
"type": "github",
24+
"url": "https://github.com/sponsors/tannerlinsley"
25+
},
26+
"keywords": [
27+
"react",
28+
"tanstack",
29+
"router",
30+
"create-react-app"
31+
],
32+
"author": "Jack Herrington <[email protected]>",
33+
"license": "MIT",
34+
"packageManager": "[email protected]",
35+
"dependencies": {
36+
"@clack/prompts": "^0.10.0",
37+
"@modelcontextprotocol/sdk": "^1.6.0",
38+
"chalk": "^5.4.1",
39+
"commander": "^13.1.0",
40+
"ejs": "^3.1.10",
41+
"execa": "^9.5.2",
42+
"express": "^4.21.2",
43+
"memfs": "^4.17.0",
44+
"prettier": "^3.5.0",
45+
"templates": "workspace:*",
46+
"zod": "^3.24.2"
47+
},
48+
"devDependencies": {
49+
"@tanstack/config": "^0.16.2",
50+
"@types/ejs": "^3.1.5",
51+
"@types/express": "^5.0.0",
52+
"@types/node": "^22.13.4",
53+
"eslint": "^9.20.0",
54+
"eslint-plugin-react-hooks": "^5.1.0",
55+
"eslint-plugin-unused-imports": "^4.1.4",
56+
"typescript": "^5.6.3",
57+
"vitest": "^3.0.8"
58+
}
59+
}

src/add-ons.ts renamed to packages/engine/src/add-ons.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { readFile } from 'node:fs/promises'
22
import { existsSync, readFileSync, readdirSync, statSync } from 'node:fs'
33
import { resolve } from 'node:path'
4-
import { fileURLToPath } from 'node:url'
54
import chalk from 'chalk'
5+
import { getModuleRoot } from 'templates'
66

77
import { DEFAULT_FRAMEWORK } from './constants.js'
88
import type { AddOn, CliOptions, Framework } from './types.js'
@@ -30,9 +30,7 @@ export async function getAllAddOns(
3030
const addOns: Array<AddOn> = []
3131

3232
for (const type of ['add-on', 'example']) {
33-
const addOnsBase = fileURLToPath(
34-
new URL(`../templates/${framework}/${type}`, import.meta.url),
35-
)
33+
const addOnsBase = resolve(getModuleRoot(), framework, type)
3634

3735
if (!existsSync(addOnsBase)) {
3836
continue

0 commit comments

Comments
 (0)