angular.json assets: use wildcard as name

Viewed 444

angular.json assets: use wildcard as name

I would like to include assets in my build while utilizing namespaces from the input or glob for the output. By the way, its in a monorepo, but that really doesn't matter. Here's what I have:

{
  "input": "libs/my-app/features/**/src/lib/assets/content",
  "glob": "content.json",
  "output": "./assets/content/features/x"
}

And here's what I'd like:

{
  "input": "libs/my-app/features/{{folderName}}/src/lib/assets/content",
  "glob": "content.json",
  "output": "./assets/content/features/{{folderName}}"
}

Can I use a RegExp? Something like:

{
  "input": "libs/my-app/features/([^/]*)/src/lib/assets/content",
  "glob": "content.json",
  "output": "./assets/content/features/$1"
}

The output I expect would look like:

~/dist/assets/content/features/some-folder-name/content.json

Any way to accomplish this?

0 Answers
Related