Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion gdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export class GDF {
}

get vite() {
return !!(this.#pj.scripts?.dev === 'vite')
return !!(this.#pj.scripts?.dev === 'vite') && !this.tanstackStart
}

// Does this application use remix.run?
Expand Down Expand Up @@ -238,6 +238,17 @@ export class GDF {
return !!this.#pj.dependencies?.nuxt
}

// Does this application use TanStack Start?
get tanstackStart() {
return !!(this.#pj.dependencies?.['@tanstack/react-start'] ||
this.#pj.dependencies?.['@tanstack/solid-start'])
}

// Does this application build with the nitro vite plugin?
get nitro() {
return !!(this.#pj.dependencies?.nitro || this.#pj.devDependencies?.nitro)
}

// Does this application use gatsby?
get gatsby() {
return !!this.#pj.dependencies?.gatsby
Expand Down Expand Up @@ -802,6 +813,7 @@ export class GDF {
if (this.meteor) runtime = 'Meteor'
if (this.nextjs) runtime = 'Next.js'
if (this.nuxtjs) runtime = 'Nuxt'
if (this.tanstackStart) runtime = 'TanStack'
if (this.nestjs) runtime = 'NestJS'
if (this.gatsby) runtime = 'Gatsby'
if (this.svelte) runtime = 'SvelteKit'
Expand Down Expand Up @@ -846,6 +858,11 @@ export class GDF {
return ['node', '/app/build/server.js']
} else if (this.nuxtjs) {
return ['node', '.output/server/index.mjs']
} else if (this.tanstackStart && this.nitro) {
return [this.bun ? 'bun' : 'node', '.output/server/index.mjs']
} else if (this.tanstackStart) {
// srvx is a dependency of TanStack Start itself
return [this.npx, 'srvx', '--prod', '-s', '../client', 'dist/server/server.js']
} else if (this.meteor) {
return ['node', 'main.js']
} else if (this.gatsby) {
Expand Down
6 changes: 6 additions & 0 deletions test/frameworks/tanstack-start-nitro/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/.git
/node_modules
.dockerignore
.env
Dockerfile
fly.toml
45 changes: 45 additions & 0 deletions test/frameworks/tanstack-start-nitro/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# syntax = docker/dockerfile:1

# Adjust NODE_VERSION as desired
ARG NODE_VERSION=xxx
FROM node:${NODE_VERSION}-slim AS base

LABEL fly_launch_runtime="TanStack"

# TanStack app lives here
WORKDIR /app

# Set production environment
ENV NODE_ENV="production"


# Throw-away build stage to reduce size of final image
FROM base AS build

# Install packages needed to build node modules
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3

# Install node modules
COPY package-lock.json package.json ./
RUN npm ci --include=dev

# Copy application code
COPY . .

# Build application
RUN npm run build

# Remove development dependencies
RUN npm prune --omit=dev


# Final stage for app image
FROM base

# Copy built application
COPY --from=build /app /app

# Start the server by default, this can be overwritten at runtime
EXPOSE 3000
CMD [ "node", ".output/server/index.mjs" ]
6 changes: 6 additions & 0 deletions test/frameworks/tanstack-start-nitro/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions test/frameworks/tanstack-start-nitro/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "tanstack-start-nitro",
"private": true,
"type": "module",
"scripts": {
"dev": "vite dev --port 3000",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"@tanstack/react-router": "1.170.45",
"@tanstack/react-start": "1.169.3",
"react": "^19.2.0",
"react-dom": "^19.2.0"
},
"devDependencies": {
"@vitejs/plugin-react": "^6.0.1",
"nitro": "^3.0.0",
"typescript": "^6.0.2",
"vite": "^8.0.0"
}
}
6 changes: 6 additions & 0 deletions test/frameworks/tanstack-start/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/.git
/node_modules
.dockerignore
.env
Dockerfile
fly.toml
45 changes: 45 additions & 0 deletions test/frameworks/tanstack-start/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# syntax = docker/dockerfile:1

# Adjust NODE_VERSION as desired
ARG NODE_VERSION=xxx
FROM node:${NODE_VERSION}-slim AS base

LABEL fly_launch_runtime="TanStack"

# TanStack app lives here
WORKDIR /app

# Set production environment
ENV NODE_ENV="production"


# Throw-away build stage to reduce size of final image
FROM base AS build

# Install packages needed to build node modules
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3

# Install node modules
COPY package-lock.json package.json ./
RUN npm ci --include=dev

# Copy application code
COPY . .

# Build application
RUN npm run build

# Remove development dependencies
RUN npm prune --omit=dev


# Final stage for app image
FROM base

# Copy built application
COPY --from=build /app /app

# Start the server by default, this can be overwritten at runtime
EXPOSE 3000
CMD [ "npx", "srvx", "--prod", "-s", "../client", "dist/server/server.js" ]
6 changes: 6 additions & 0 deletions test/frameworks/tanstack-start/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions test/frameworks/tanstack-start/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "tanstack-start",
"private": true,
"type": "module",
"scripts": {
"dev": "vite dev --port 3000",
"build": "vite build",
"start": "node .output/server/index.mjs",
"preview": "vite preview"
},
"dependencies": {
"@tanstack/solid-router": "1.169.3",
"@tanstack/solid-start": "1.169.3",
"solid-js": "^1.9.9"
},
"devDependencies": {
"typescript": "^6.0.2",
"vite": "^8.0.0",
"vite-plugin-solid": "^2.11.10"
}
}
Loading