Files
spartan-ng__spartan/apps/app/project.json
Ashley Hunter ef2342aae2 feat: add "Open in StackBlitz" to component examples (#1381)
Adds a button on each runnable docs example that boots a real, runnable
Angular CLI project on StackBlitz, with helm source vendored from the existing
generated pipeline so it stays in sync.

- generate-hlm-component-preview captures the exact CLI output (libs/ui, deps,
  tsconfig paths) and version/preset metadata; all @angular packages pinned to a
  single consistent major; example-only deps (tanstack, luxon, ngx-scrollbar,
  embla autoplay, extra ng-icon sets) added explicitly
- generate-primitive-snippets bundles sibling files of multi-file examples
  (e.g. data-table) and rewrites back-references to the entry
- client-side builder assembles the project, drops mismatched Angular ranges,
  rewrites /assets URLs to the live docs origin, and bundles siblings
- docs-internal examples (RTL) are excluded as not self-contained
- fix data-table flexRenderComponent calls that only failed under strict AOT
2026-06-03 12:03:09 +02:00

103 lines
2.6 KiB
JSON

{
"name": "app",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"sourceRoot": "apps/app/src",
"tags": [],
"implicitDependencies": [],
"targets": {
"build": {
"dependsOn": ["^build", "generate-docs-and-snippets", "generate-hlm-component-preview"],
"executor": "@analogjs/platform:vite",
"outputs": [
"{options.outputPath}",
"{workspaceRoot}/dist/apps/app/.nitro",
"{workspaceRoot}/dist/apps/app/ssr",
"{workspaceRoot}/dist/apps/app/analog"
],
"options": {
"main": "apps/app/src/main.ts",
"configFile": "apps/app/vite.config.ts",
"outputPath": "dist/apps/app/client",
"tsConfig": "apps/app/tsconfig.app.json"
},
"defaultConfiguration": "production",
"configurations": {
"development": {
"mode": "development"
},
"production": {
"sourcemap": false,
"mode": "production"
}
}
},
"serve": {
"dependsOn": ["generate-docs-and-snippets", "generate-hlm-component-preview"],
"executor": "@analogjs/platform:vite-dev-server",
"defaultConfiguration": "development",
"options": {
"buildTarget": "app:build",
"port": 4200
},
"configurations": {
"development": {
"buildTarget": "app:build:development",
"hmr": true
},
"production": {
"buildTarget": "app:build:production"
}
}
},
"extract-i18n": {
"executor": "@angular/build:extract-i18n",
"options": {
"browserTarget": "app:build"
}
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"]
},
"test": {
"executor": "@analogjs/platform:vitest",
"outputs": ["{projectRoot}/coverage"]
},
"serve-nitro": {
"executor": "nx:run-commands",
"options": {
"cwd": "",
"command": "PORT=4205 node dist/apps/app/analog/server/index.mjs"
},
"dependsOn": ["build"]
},
"generate-ui-docs": {
"executor": "@spartan-ng/tools:generate-ui-docs",
"cache": false,
"options": {
"outputDir": "apps/app/src/public/data",
"outputFile": "ui-api.json",
"brainDir": "libs/brain",
"helmDir": "libs/helm"
}
},
"generate-docs-and-snippets": {
"executor": "nx:run-commands",
"cache": false,
"options": {
"commands": ["nx run app:generate-ui-docs", "npx nx generate @spartan-ng/tools:generate-primitive-snippets"],
"parallel": false
}
},
"generate-hlm-component-preview": {
"executor": "nx:run-commands",
"cache": false,
"options": {
"commands": ["npx nx generate @spartan-ng/tools:generate-hlm-component-preview"],
"parallel": false
}
}
}
}