aspect-build / aspect-build/rules_js
[FR]: Document how to work with CSS files published by @angular/material
- Dominant language
- Starlark
- Stars
- 378
- Forks
- 183
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 32
Description
### What is the current behavior?
Error encountered when trying to depend on a file within an npm dependency:
```
no such target '//:node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css'
```
It's unclear how to depend on this file.
### Describe the feature
With `rules_nodejs` and `rules_sass`, I used to have this:
```starlark
sass_binary(
name = "styles",
src = "styles.scss",
deps = [
":styles_deps",
#"//:node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css",
],
)
sass_library(
name = "styles_deps",
srcs = [
"//:node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css",
# //:node_modules/@angular/material
],
)
```
It no longer works due to the build error above. Do the npm rules in `rules_js` make such files available as bazel targets? How/why not?
### Fund our work
- [ ] Sponsor our open source work by donating a [feature bounty](https://opencollective.com/aspect-build/)
Contributor guide
Research direction
Start with the shown styles.scss, sass_binary, and sass_library configuration and reproduce the missing-target error for Angular Material's prebuilt-themes/deeppurple-amber.css path. Review how rules_js exposes files from npm dependencies, then document whether this CSS file is a Bazel target and how it should be consumed; done means a newcomer can follow the documented setup without the reported error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, sass
- Domain
- build-system, documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100