Skip to content

Commit

Permalink
refactor(docs-infra): refactor adev to build using architect (angular…
Browse files Browse the repository at this point in the history
…#53497)

Refactor adev as needed to build using architect.

PR Close angular#53497
  • Loading branch information
josephperrott committed Dec 11, 2023
1 parent 7c8f026 commit cebe2db
Show file tree
Hide file tree
Showing 50 changed files with 221 additions and 514 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,7 @@ baseline.json
# Husky
.husky/_
aio/content/examples/.DS_Store


# Ignore cache created with the Angular CLI.
.angular/
1 change: 1 addition & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ exports_files([
"scripts/ci/payload-size.sh",
"scripts/ci/payload-size.js",
"package.json",
"angular.json",
])

filegroup(
Expand Down
65 changes: 0 additions & 65 deletions adev/.gitignore
Original file line number Diff line number Diff line change
@@ -1,67 +1,2 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# Compiled output
/dist
/tmp
/out-tsc
/bazel-out
/src/assets/tutorials
/src/assets/previews
/TEMP

# Node
node_modules
npm-debug.log
yarn-error.log

# IDEs and editors
.idea/
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# Miscellaneous
/.angular/cache
.sass-cache/
/connect.lock
/coverage
/libpeerconnection.log
testem.log
/typings

# Ignore ng-dev logs and user-config
.ng-dev.err*
.ng-dev.log
.ng-dev.user*

# System files
.DS_Store
Thumbs.db


# Yarn v2+. Zero installs disabled since we are not using PnP.
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
!.yarn/yarn.js


# Firebase
.firebase
*-debug.log
.runtimeconfig.json
42 changes: 0 additions & 42 deletions adev/.markdownlint.jsonc

This file was deleted.

1 change: 0 additions & 1 deletion adev/.markdownlintignore

This file was deleted.

2 changes: 0 additions & 2 deletions adev/.prettierignore

This file was deleted.

5 changes: 0 additions & 5 deletions adev/.stylelintignore

This file was deleted.

130 changes: 0 additions & 130 deletions adev/.stylelintrc.json

This file was deleted.

79 changes: 79 additions & 0 deletions adev/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
load("@npm//@angular-devkit/architect-cli:index.bzl", "architect")
load("@build_bazel_rules_nodejs//:index.bzl", "copy_to_bin")

# All source and configuration files required to build the docs app
APPLICATION_FILES = [
"//:angular.json",
"adev/tsconfig.app.json",
"adev/tsconfig.json",
"adev/tsconfig.worker.json",
] + glob(
["adev/src/**/*"],
exclude = [
"adev/src/**/*.spec.ts",
# Temporarily exclude generated sources produced by the non-bazel
# build until the whole project is built by bazel and this directory
# isn't needed.
"adev/src/generated/**/*",
],
)

APPLICATION_DEPS = [
"@npm//@angular-devkit/build-angular",
"@npm//@angular/animations",
"@npm//@angular/cdk",
"@npm//@angular/common",
"@npm//@angular/compiler",
"@npm//@angular/compiler-cli",
"@npm//@angular/core",
"@npm//@angular/docs",
"@npm//@angular/forms",
"@npm//@angular/material",
"@npm//@angular/platform-browser",
"@npm//@angular/platform-server",
"@npm//@angular/router",
"@npm//gsap",
"@npm//marked",
"@npm//ngx-progressbar",
"@npm//ogl",
"@npm//rxjs",
"@npm//typescript",
]

copy_to_bin(
name = "application_files_bin",
srcs = APPLICATION_FILES,
)

architect(
name = "build",
args = [
"angular-dev:build",
"--output-path=build-app",
],
chdir = "$(RULEDIR)",
data = APPLICATION_DEPS + [
":application_files_bin",
],
output_dir = True,
# When building with local packages (--config=aio_local_deps), RBE complains about
# the input tree being too large (> 70,000 files).
tags = ["no-remote-exec"],
)

architect(
name = "serve",
args = [
"angular-dev:serve",
"--poll=1000",
"--live-reload",
"--watch",
],
chdir = package_name(),
data = APPLICATION_DEPS + [
":application_files_bin",
],
# When building with local packages (--config=aio_local_deps), RBE complains about
# the input tree being too large (> 70,000 files).
tags = ["no-remote-exec"],
)
3 changes: 0 additions & 3 deletions adev/README.md

This file was deleted.

Loading

0 comments on commit cebe2db

Please sign in to comment.