# find-extension-and-copy

> Find the files by extensions and copy

Latest version **1.0.2** (published 2019-11-25) · ISC license · 0 weekly downloads

## Install

```sh
npm install find-extension-and-copy
pnpm add find-extension-and-copy
yarn add find-extension-and-copy
bun add find-extension-and-copy
```

Provides the command `feac`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2019-11-25 |
| First published | 2019-11-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 21 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | CEOmurky |
| Maintainers | ceomurky |
| Keywords | find files, find the files by extension |

## Links

- npm: https://www.npmjs.com/package/find-extension-and-copy
- npm.io page: https://npm.io/package/find-extension-and-copy

## Recent versions

- 1.0.2 (latest) — 2019-11-25
- 1.0.1 — 2019-11-25
- 1.0.0 — 2019-11-25

## README

# find-extension-and-copy

find the files by extensions and copy

## usage - without defined in json

`feac targetDir={parameter} extensions=[{extension}, {extension2}, {...args}] dist={parameter} replaceFolder={parameter}`

```json
"scripts": {
	"build-readme": "feac targetDir=readme extensions=[.md, .png] dist=readme replaceFolder=true"
}
```

## usage - with defined in json

```json
"scripts": {
	"build-readme": "feac"
}
```

### package.json

```json
	"feac": {
		"targetDir": "src",
		"extensions": [".md", ".png"],
        "dist": "readme",
        "replaceFolder": true
	}
```

### root/feac.json

```json
// project root/feac.json
{
    "targetDir": "src",
    "extensions": [".md", ".png"],
    "dist": "readme",
    "replaceFolder": true
}
```

### configs/feac.json

```json
// project root/configs/feac.json
{
    "targetDir": "src",
    "extensions": [".md", ".png"],
    "dist": "readme",
    "replaceFolder": true
}
```

#### ignore patches

add option 'ignore'


```json
// 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`




## example

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
```

### replaceFolder: true

```json
"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
```

### replaceFolder: false


```json
"feac": {
    "targetDir": "src",
    "extensions": [".md", ".png"],
    "dist": "readme",
    "replaceFolder": false
}
```

output
```json
└─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
```

---
_Source: https://npm.io/package/find-extension-and-copy · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
