You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+87-10Lines changed: 87 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,10 +19,18 @@ cd src
19
19
npm run build
20
20
```
21
21
Compiles TypeScript to JavaScript and copies necessary files to `dist/`. The build process:
22
-
1. Cleans the `dist` directory
23
-
2. Generates TypeScript types from `deploy/schema.json`
24
-
3. Compiles TypeScript using `tsconfig.build.json`
25
-
4. Copies metadata files (builders.json, collection.json, etc.) to `dist/`
22
+
1.**`prebuild`**: Cleans the `dist` directory and regenerates `deploy/schema.d.ts` from `deploy/schema.json`
23
+
2.**`build`**: Compiles TypeScript using `tsconfig.build.json`
24
+
3.**`postbuild`**: Copies metadata files (builders.json, collection.json, schema.json, etc.) to `dist/`
25
+
26
+
**Important:** After editing `deploy/schema.json`, you MUST run `npm run build` to regenerate `schema.d.ts` and sync `dist/deploy/schema.json`. The build artifacts are gitignored (as they should be), so they won't be committed.
27
+
28
+
**Schema Artifact Sync:**
29
+
-`src/deploy/schema.json` - Source of truth (edit this)
30
+
-`src/deploy/schema.d.ts` - Generated TypeScript types (auto-generated via `json-schema-to-typescript`)
31
+
-`src/dist/deploy/schema.json` - Distributed schema (copied during build)
32
+
33
+
**npm scripts compatibility:** This project does NOT use lifecycle hooks (`prepare`, `postinstall`, etc.). All build steps are manual via `npm run <script>`. Safe to use with `ignore-scripts=true` in global `.npmrc` for security.
**Important:** With Angular 17+, the build target resolution follows a strict precedence order. The builder evaluates targets in this order and uses the first one found:
137
145
138
-
**Precedence (highest to lowest):**
146
+
**Internal Implementation Precedence (what the code actually does):**
139
147
1.`prerenderTarget` - For SSG/prerendering builds (if specified, overrides all others)
3. Default: `${project}:build:production` if none specified
156
+
157
+
**Note:**`browserTarget` is deliberately HIDDEN from user-facing documentation per deprecation policy, even though it still works internally for backward compatibility.
0 commit comments