build: refactor location of best-practices.md

This commit moves the best-practices.md file from adev/src/context to packages/core/resources. The BUILD.bazel files and other configuration files have been updated to reflect this change.
This commit is contained in:
Alan Agius 2025-10-24 18:45:32 +02:00 committed by GitHub
parent 029ed83e8b
commit 07a51872d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 28 additions and 4 deletions

View file

@ -3,7 +3,7 @@
"separateFilePatterns": ["packages/core/primitives/**"],
"alwaysExternalFilePatterns": [
"packages/*",
"packages/bazel/**",
"packages/core/resources/**",
"packages/compiler-cli/linker/**",
"packages/compiler-cli/src/ngtsc/sourcemaps/**",
"packages/compiler-cli/src/ngtsc/testing/**",

View file

@ -133,6 +133,7 @@ copy_to_directory(
name = "context",
srcs = [
"//adev/src/context",
"//packages/core/resources:best-practices.md",
],
replace_prefixes = {
"**/": "",

View file

@ -9,6 +9,7 @@ generate_guides(
data = [
"//adev/src/assets/images:what_is_angular.svg",
"//adev/src/context",
"//packages/core/resources:best-practices.md",
],
visibility = ["//adev:__subpackages__"],
)

View file

@ -10,9 +10,9 @@ NOTE: These files will be updated on a regular basis staying up to date with Ang
Here is a set of instructions to help LLMs generate correct code that follows Angular best practices. This file can be included as system instructions to your AI tooling or included along with your prompt as context.
<docs-code language="md" path="adev/src/context/best-practices.md" class="compact"/>
<docs-code language="md" path="packages/core/resources/best-practices.md" class="compact"/>
<a download href="/assets/context/best-practices.md" target="_blank">Click here to download the best-practices.md file.</a>
<a download href="/assets/context/best-practices.md" target="_blank">Click here to download the best-practices.md file.</a>
## Rules Files
Several editors, such as <a href="https://studio.firebase.google.com?utm_source=adev&utm_medium=website&utm_campaign=BUILD_WITH_AI_ANGULAR&utm_term=angular_devrel&utm_content=build_with_ai_angular_firebase_studio">Firebase Studio</a> have rules files useful for providing critical context to LLMs.
@ -35,7 +35,7 @@ The Angular CLI includes an experimental [Model Context Protocol (MCP) server](h
`llms.txt` is a proposed standard for websites designed to help LLMs better understand and process their content. The Angular team has developed two versions of this file to help LLMs and tools that use LLMs for code generation to create better modern Angular code.
* <a href="/llms.txt" target="_blank">llms.txt</a> - an index file providing links to key files and resources.
* <a href="/llms.txt" target="_blank">llms.txt</a> - an index file providing links to key files and resources.
* <a href="/context/llm-files/llms-full.txt" target="_blank">llms-full.txt</a> - a more robust compiled set of resources describing how Angular works and how to build Angular applications.
Be sure [to check out the overview page](/ai) for more information on how to integrate AI into your Angular applications.

View file

@ -58,6 +58,7 @@ ng_package(
srcs = [
"package.json",
":event_dispatch_contract_binary",
"//packages/core/resources",
],
nested_packages = [
"//packages/core/schematics:npm_package",

View file

@ -40,6 +40,12 @@
"migrations": "./schematics/migrations.json",
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
},
"angular": {
"bestPractices": {
"format": "markdown",
"path": "./resources/best-practices.md"
}
},
"schematics": "./schematics/collection.json",
"sideEffects": false
}

View file

@ -0,0 +1,15 @@
exports_files(
srcs = ["best-practices.md"],
visibility = [
"//adev/src/assets:__pkg__",
"//adev/src/content/ai:__pkg__",
],
)
filegroup(
name = "resources",
srcs = ["best-practices.md"],
visibility = [
"//packages/core:__pkg__",
],
)