Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Nuxt 4+ development patterns: server routes, file-based routing, middleware, composables, and h3 v1 / nitropack v2.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/project-setup.md
1# Project Setup23Standard patterns for new Nuxt projects: CI, ESLint, package scripts.45## CI Workflow67```yaml8# .github/workflows/ci.yml9name: CI10on: [push, pull_request]1112jobs:13ci:14runs-on: ubuntu-latest15steps:16- uses: actions/checkout@v417- uses: pnpm/action-setup@v418- uses: actions/setup-node@v419with: {node-version: 22, cache: pnpm}20- run: pnpm install --frozen-lockfile21- run: pnpm prepare22- run: pnpm lint23- run: pnpm typecheck24- run: pnpm test # if tests exist25```2627**With env vars:**2829```yaml30env:31DATABASE_URL: postgresql://test:test@localhost:5432/test32API_KEY: test33```3435## ESLint Config3637```js38// eslint.config.mjs39import antfu from '@antfu/eslint-config'40import withNuxt from './.nuxt/eslint.config.mjs'4142export default withNuxt(43antfu({44formatters: true,45vue: true,46pnpm: true,47ignores: ['.eslintcache', 'cache/**', '.claude/**', 'README.md', 'docs/**'],48}),49)50```5152**For monorepos, add:**5354```js55ignores: ['apps/web/.nuxt/**', 'packages/**/dist/**']56```5758## Package Scripts5960```json61{62"scripts": {63"dev": "nuxt dev",64"build": "nuxt build",65"preview": "nuxt preview",66"prepare": "nuxt prepare",67"lint": "eslint . --cache",68"lint:fix": "eslint . --fix --cache",69"typecheck": "nuxt typecheck"70}71}72```7374## Key Conventions7576| Convention | Standard |77| --------------- | ----------------------------------------------------- |78| Package manager | pnpm with `--frozen-lockfile` in CI |79| Node version | 22-24 |80| ESLint base | @antfu/eslint-config |81| Formatter | Via ESLint (`formatters: true`), no separate Prettier |82| Cache | `--cache` flag on lint scripts |83| Prepare step | Required before lint/typecheck in CI |8485## NuxtHub Deployment8687```yaml88# .github/workflows/nuxthub.yml89name: Deploy to NuxtHub90on: push9192jobs:93deploy:94runs-on: ubuntu-latest95permissions: {contents: read, id-token: write}96steps:97- uses: actions/checkout@v498- uses: pnpm/action-setup@v499- uses: actions/setup-node@v4100with: {node-version: 22, cache: pnpm}101- run: pnpm install102- uses: nuxt-hub/action@v2103with:104project-key: your-project-key105```106107> **For pnpm catalogs, release workflows, tsconfig patterns:** see `ts-library` skill108