find the files by extensions and copy
feac targetDir={parameter} extensions=[{extension}, {extension2}, {...args}] dist={parameter} replaceFolder={parameter}
"scripts": {
"build-readme": "feac targetDir=readme extensions=[.md, .png] dist=readme replaceFolder=true"
}
"scripts": {
"build-readme": "feac"
}
"feac": {
"targetDir": "src",
"extensions": [".md", ".png"],
"dist": "readme",
"replaceFolder": true
}
// project root/feac.json
{
"targetDir": "src",
"extensions": [".md", ".png"],
"dist": "readme",
"replaceFolder": true
}
// project root/configs/feac.json
{
"targetDir": "src",
"extensions": [".md", ".png"],
"dist": "readme",
"replaceFolder": true
}
add option 'ignore'
// project root/configs/feac.json
{
"targetDir": "src",
"extensions": [".md", ".png"],
"dist": "readme",
"ignore": ["node_modules"]
}
or
feac targetDir={parameter} extensions=[{extension}, {extension2}, {...args}] dist={parameter} replaceFolder={parameter} ignore=node_modules
I need all of src in .md
, .png
with folder
input
└─src
│ configs.ts
│ finder.ts
│ index.ts
│ README.md
│
└─files
│ role.md
│ test.ts
│
└─images
area-spline.pne.png
area.png
column-chart.png
exmaple-bar-chart.png
README.md
"feac": {
"targetDir": "src",
"extensions": [".md", ".png"],
"dist": "readme",
"replaceFolder": true
}
output
─readme
│ README.md
│
└─test
│ role.md
│
└─images
area-spline.pne.png
area.png
column-chart.png
exmaple-bar-chart.png
line.png
pie.png
scatter.png
spline.png
stacked-area-spline.png
stacked-area.png
stacked-bar.png
stacked-column.png
two-level-pie.png
"feac": {
"targetDir": "src",
"extensions": [".md", ".png"],
"dist": "readme",
"replaceFolder": false
}
output
└─readme
area-spline.pne.png
area.png
column-chart.png
exmaple-bar-chart.png
line.png
pie.png
README.md
role.md
scatter.png
spline.png
stacked-area-spline.png
stacked-area.png
stacked-bar.png
stacked-column.png
two-level-pie.png