Skip to content

Commit 07a5187

Browse files
authored
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.
1 parent 029ed83 commit 07a5187

File tree

8 files changed

+28
-4
lines changed

8 files changed

+28
-4
lines changed

.ng-dev/google-sync-config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"separateFilePatterns": ["packages/core/primitives/**"],
44
"alwaysExternalFilePatterns": [
55
"packages/*",
6-
"packages/bazel/**",
6+
"packages/core/resources/**",
77
"packages/compiler-cli/linker/**",
88
"packages/compiler-cli/src/ngtsc/sourcemaps/**",
99
"packages/compiler-cli/src/ngtsc/testing/**",

adev/src/assets/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ copy_to_directory(
133133
name = "context",
134134
srcs = [
135135
"//adev/src/context",
136+
"//packages/core/resources:best-practices.md",
136137
],
137138
replace_prefixes = {
138139
"**/": "",

adev/src/content/ai/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ generate_guides(
99
data = [
1010
"//adev/src/assets/images:what_is_angular.svg",
1111
"//adev/src/context",
12+
"//packages/core/resources:best-practices.md",
1213
],
1314
visibility = ["//adev:__subpackages__"],
1415
)

adev/src/content/ai/develop-with-ai.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ NOTE: These files will be updated on a regular basis staying up to date with Ang
1010

1111
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.
1212

13-
<docs-code language="md" path="adev/src/context/best-practices.md" class="compact"/>
13+
<docs-code language="md" path="packages/core/resources/best-practices.md" class="compact"/>
1414

15-
<a download href="/assets/context/best-practices.md" target="_blank">Click here to download the best-practices.md file.</a>
15+
<a download href="/assets/context/best-practices.md" target="_blank">Click here to download the best-practices.md file.</a>
1616

1717
## Rules Files
1818
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
3535
`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.
3636

3737

38-
* <a href="/llms.txt" target="_blank">llms.txt</a> - an index file providing links to key files and resources.
38+
* <a href="/llms.txt" target="_blank">llms.txt</a> - an index file providing links to key files and resources.
3939
* <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.
4040

4141
Be sure [to check out the overview page](/ai) for more information on how to integrate AI into your Angular applications.

packages/core/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ ng_package(
5858
srcs = [
5959
"package.json",
6060
":event_dispatch_contract_binary",
61+
"//packages/core/resources",
6162
],
6263
nested_packages = [
6364
"//packages/core/schematics:npm_package",

packages/core/package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@
4040
"migrations": "./schematics/migrations.json",
4141
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
4242
},
43+
"angular": {
44+
"bestPractices": {
45+
"format": "markdown",
46+
"path": "./resources/best-practices.md"
47+
}
48+
},
4349
"schematics": "./schematics/collection.json",
4450
"sideEffects": false
4551
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
exports_files(
2+
srcs = ["best-practices.md"],
3+
visibility = [
4+
"//adev/src/assets:__pkg__",
5+
"//adev/src/content/ai:__pkg__",
6+
],
7+
)
8+
9+
filegroup(
10+
name = "resources",
11+
srcs = ["best-practices.md"],
12+
visibility = [
13+
"//packages/core:__pkg__",
14+
],
15+
)

0 commit comments

Comments
 (0)