Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions packages/angular/cli/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ package(default_visibility = ["//visibility:public"])

npm_link_all_packages()

genrule(
name = "angular_best_practices",
srcs = [
"//:node_modules/@angular/core/dir",
],
outs = ["src/commands/mcp/resources/best-practices.md"],
cmd = """
cp "$(location //:node_modules/@angular/core/dir)/resources/best-practices.md" $@
""",
)

RUNTIME_ASSETS = glob(
include = [
"bin/**/*",
Expand All @@ -27,6 +38,7 @@ RUNTIME_ASSETS = glob(
) + [
"//packages/angular/cli:lib/config/schema.json",
"//packages/angular/cli:lib/code-examples.db",
":angular_best_practices",
]

ts_project(
Expand Down
47 changes: 0 additions & 47 deletions packages/angular/cli/src/commands/mcp/resources/best-practices.md

This file was deleted.

16 changes: 14 additions & 2 deletions packages/schematics/angular/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,24 @@ copy_to_bin(
srcs = glob(["**/schema.json"]),
)

genrule(
name = "angular_best_practices",
srcs = [
"//:node_modules/@angular/core/dir",
],
outs = ["ai-config/files/__rulesName__.template"],
cmd = """
echo -e "<% if (frontmatter) { %><%= frontmatter %>\\n<% } %>" > $@
cat "$(location //:node_modules/@angular/core/dir)/resources/best-practices.md" >> $@
""",
)

RUNTIME_ASSETS = [
"collection.json",
"migrations/migration-collection.json",
"package.json",
"utility/latest-versions/package.json",
":angular_best_practices",
] + glob(
include = [
"*/schema.json",
Expand Down Expand Up @@ -115,13 +128,12 @@ ts_project(
include = [
"**/*_spec.ts",
"utility/test/**/*.ts",
"refactor/jasmine-vitest/test-helpers.ts",
],
exclude = [
# NB: we need to exclude the nested node_modules that is laid out by yarn workspaces
"node_modules/**",
],
),
) + ["refactor/jasmine-vitest/test-helpers.ts"],
deps = [
":angular",
":node_modules/@angular-devkit/core",
Expand Down
49 changes: 0 additions & 49 deletions packages/schematics/angular/ai-config/files/__rulesName__.template

This file was deleted.