在将input
或glob
的命名空间用于output
的同时,我想在构建中包括资产。顺便说一句,它在monorepo中,但这并不重要。这就是我所拥有的:
{
"input": "libs/my-app/features/**/src/lib/assets/content",
"glob": "content.json",
"output": "./assets/content/features/x"
}
这就是我想要的:
{
"input": "libs/my-app/features/{{folderName}}/src/lib/assets/content",
"glob": "content.json",
"output": "./assets/content/features/{{folderName}}"
}
我可以使用RegExp吗?像这样:
{
"input": "libs/my-app/features/([^/]*)/src/lib/assets/content",
"glob": "content.json",
"output": "./assets/content/features/$1"
}
我期望的输出看起来像:
~/dist/assets/content/features/some-folder-name/content.json
有什么方法可以做到这一点?