mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fcc09089c3
This defines a bazel rule to bundle sass partials into a single file using the "scss-bundle" npm package. The rule definition is commented so that it can serve as an example for creating other rules in the future. I've also added the missing build file for badge so that its theme can be included in the bundle.
47 lines
1.1 KiB
Python
47 lines
1.1 KiB
Python
workspace(name = "angular_material")
|
|
|
|
# Add nodejs rules
|
|
git_repository(
|
|
name = "build_bazel_rules_nodejs",
|
|
remote = "https://github.com/bazelbuild/rules_nodejs.git",
|
|
commit = "0.5.1",
|
|
)
|
|
|
|
# NOTE: this rule installs nodejs, npm, and yarn, but does NOT install
|
|
# your npm dependencies. You must still run the package manager.
|
|
load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories")
|
|
node_repositories(package_json = ["//:package.json"])
|
|
|
|
# Add sass rules
|
|
git_repository(
|
|
name = "io_bazel_rules_sass",
|
|
remote = "https://github.com/bazelbuild/rules_sass.git",
|
|
tag = "0.0.3",
|
|
)
|
|
|
|
load("@io_bazel_rules_sass//sass:sass.bzl", "sass_repositories")
|
|
sass_repositories()
|
|
|
|
# Add TypeScript rules
|
|
git_repository(
|
|
name = "build_bazel_rules_typescript",
|
|
remote = "https://github.com/bazelbuild/rules_typescript.git",
|
|
tag = "0.11.1",
|
|
)
|
|
|
|
# Setup TypeScript Bazel workspace
|
|
load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace")
|
|
ts_setup_workspace()
|
|
|
|
# Add Angular rules
|
|
local_repository(
|
|
name = "angular",
|
|
path = "node_modules/@angular/bazel",
|
|
)
|
|
|
|
# Add rxjs
|
|
local_repository(
|
|
name = "rxjs",
|
|
path = "node_modules/rxjs/src",
|
|
)
|