aspect-build / aspect-build/rules_ts
[FR]: Add a `data` section to ts_config rule.
- Dominant language
- Starlark
- Stars
- 138
- Forks
- 87
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 3
Description
### What is the current behavior?
Hi,
`ts_config` rule at the moment does not allow to specify `data` dependencies.
### Describe the feature
My `tsconfig.json` sets the following options:
`"types": ["node", "./types/typings"]`
and I have a file `types/typings.d.ts` which adds some extra types for my ts project.
How do I ensure that when building the `ts_config` rule, the `types/typings.d.ts` file is present in the output directory?
Usually one might create a `filegroup` and add it as a `data` dependency, but `ts_config` has no data dependency.
Adding the filegroup as a `deps` does not result in the file being present in the output folder.
So what is the intended solution here? How do I make sure that the when building the `ts_config` target, both the `tsconfig.json` and the `types/typings.d.ts` file are present the `bazel-bin` output directory?
Contributor guide
Research direction
Start by locating the ts_config rule and inspect how it handles deps and files copied to the bazel-bin output directory. Reproduce the case with tsconfig.json, a filegroup containing types/typings.d.ts, and the types option shown in the issue; done means a data dependency can be declared and the declaration file is present in the built output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100