angular / angular/angular-cli

Asset copy with wildcard in the input path

Open
#16,283 3 comments 7 reactions 0 assignees View on GitHub
area: @angular-devkit/build-angular feature feature: insufficient votes
Dominant language
TypeScript
Stars
27k
Forks
11.8k
Avg merge
14h 23m
Merged PRs (30d)
162

Description

# 🚀 Feature request

### Command (mark with an `x`)

```
- [ ] new
- [ x] build
- [ x] serve
- [x ] test
- [ x] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
```

### Description
Currently assets array allows glob with input path, however input path itself does not support wildcards.
Like ./node_modules/@myscope/**/assets/i18n/*
Where ** is any number of unknown libraries (like shared, services, featureabc).

With glob it would also create every folder between @myscope to assets/i18n, instead of copying just the contents of i18n.

### Describe the solution you'd like
The input path allows wildcards to set the root or a flag to only copy contents of the glob result path.

### Describe alternatives you've considered
Node scripts that requires extra steps and wouldn't know if project output is different from dist and it does not work with serve.

Contributor guide

Open the contributing guide

Research direction

Start by tracing asset handling in the build, serve, test, and e2e commands, since the issue reports different behavior across them. Define how wildcard input paths should establish the copy root and verify that the requested assets are copied without unwanted intermediate folders. Done means the wildcard path works consistently for the listed commands, including serve output.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
build-system, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.