Files
twenty/packages/twenty-website/project.json
T
Abdullah. 53d4e92dda [Website] Generate release notes manifest at build time (#20913)
Removed the releases page’s runtime dependency on `fs` and
`process.cwd()` by introducing a build-time manifest generator: release
notes still live as markdown under `src/content/releases`, but a new
script now parses their frontmatter/content, validates that each note
has a release, title, and preview image (and that the image actually
exists), sorts the notes, and emits a typed `generated-release-notes.ts`
file that the app imports at runtime.

Updated the releases loader to return that generated data, changed the
menu releases preview and release JSON-LD to use explicit typed fields
(`title`, `previewImage`) instead of scraping markdown with regex at
runtime, wired the generator into Nx so it runs automatically before
`dev`, `build`, and `typecheck`, and fixed two stale image references in
the release MDX files that the new validation exposed.

---------

Co-authored-by: prastoin <paul@twenty.com>
2026-05-26 16:46:11 +02:00

145 lines
3.9 KiB
JSON

{
"name": "twenty-website",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/twenty-website/src",
"projectType": "application",
"tags": ["scope:website"],
"targets": {
"generate-release-manifest": {
"executor": "nx:run-commands",
"cache": true,
"inputs": [
"{projectRoot}/src/content/releases/**/*",
"{projectRoot}/public/images/releases/**/*",
"{projectRoot}/scripts/generate-release-notes-manifest.mjs"
],
"outputs": ["{projectRoot}/src/lib/releases/generated-release-notes.ts"],
"options": {
"cwd": "{projectRoot}",
"command": "node scripts/generate-release-notes-manifest.mjs"
}
},
"build": {
"executor": "nx:run-commands",
"cache": true,
"inputs": ["production", "^production"],
"outputs": ["{projectRoot}/.next"],
"options": {
"cwd": "{projectRoot}",
"command": "npx next build"
},
"dependsOn": ["generate-release-manifest", "^build"]
},
"dev": {
"executor": "nx:run-commands",
"cache": false,
"dependsOn": ["generate-release-manifest"],
"options": {
"cwd": "{projectRoot}",
"command": "npx next dev --port 3002"
}
},
"start": {
"executor": "nx:run-commands",
"cache": false,
"dependsOn": ["build"],
"options": {
"cwd": "{projectRoot}",
"command": "npx next start --port 3002"
}
},
"check-boundaries": {
"executor": "nx:run-commands",
"cache": true,
"inputs": [
"{projectRoot}/src/**/*",
"{projectRoot}/scripts/check-boundaries.mjs"
],
"options": {
"cwd": "{projectRoot}",
"command": "node scripts/check-boundaries.mjs"
}
},
"check-section-shape": {
"executor": "nx:run-commands",
"cache": true,
"inputs": [
"{projectRoot}/src/sections/**/*",
"{projectRoot}/scripts/check-section-shape.mjs"
],
"options": {
"cwd": "{projectRoot}",
"command": "node scripts/check-section-shape.mjs"
}
},
"check-lottie-frames": {
"executor": "nx:run-commands",
"cache": true,
"inputs": [
"{projectRoot}/public/lottie/stepper/stepper.lottie",
"{projectRoot}/src/sections/HomeStepper/utils/home-stepper-lottie-frame-map.ts",
"{projectRoot}/scripts/check-lottie-frames.mjs"
],
"options": {
"cwd": "{projectRoot}",
"command": "node scripts/check-lottie-frames.mjs"
}
},
"lint": {
"executor": "nx:run-commands",
"cache": true,
"dependsOn": [
"check-boundaries",
"check-section-shape",
"check-lottie-frames",
"^build",
"twenty-oxlint-rules:build"
],
"options": {
"cwd": "{projectRoot}",
"command": "npx oxlint -c .oxlintrc.json . && (npx oxfmt --check . || (echo 'ERROR: oxfmt formatting check failed! Fix with: npx nx run twenty-website:lint --configuration=fix' && false))"
},
"configurations": {
"fix": {
"command": "npx oxlint -c .oxlintrc.json . && npx oxfmt ."
}
}
},
"lint:diff-with-main": {
"dependsOn": [
"check-boundaries",
"check-section-shape",
"check-lottie-frames"
]
},
"typecheck": {
"dependsOn": ["generate-release-manifest"]
},
"test": {},
"fmt": {
"options": {
"files": "."
},
"configurations": {
"fix": {}
}
},
"lingui:extract": {
"executor": "nx:run-commands",
"dependsOn": ["^build"],
"options": {
"cwd": "{projectRoot}",
"command": "lingui extract --overwrite --clean"
}
},
"lingui:compile": {
"executor": "nx:run-commands",
"dependsOn": ["^build"],
"options": {
"cwd": "{projectRoot}",
"command": "lingui compile --typescript"
}
}
}
}