# @d-dev/plop-add-files-plugin

> Polp plugin for adding files.

Latest version **1.2.1** (published 2022-10-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install @d-dev/plop-add-files-plugin
pnpm add @d-dev/plop-add-files-plugin
yarn add @d-dev/plop-add-files-plugin
bun add @d-dev/plop-add-files-plugin
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2022-10-31 |
| First published | 2022-07-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 26.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Derek Worthen <worthend.derek@gmail.com> |
| Maintainers | dworthen |
| Keywords | plop, addFiles, scaffold, plugin |

## Links

- npm: https://www.npmjs.com/package/@d-dev/plop-add-files-plugin
- Repository: https://github.com/dworthen/utils
- npm.io page: https://npm.io/package/@d-dev/plop-add-files-plugin

## Dependencies (2)

- [glob](https://npm.io/package/glob.md) ^8.0.3
- [@d-dev/logger](https://npm.io/package/@d-dev/logger.md) ^1.1.0

## Recent versions

- 1.2.1 (latest) — 2022-10-31
- 1.2.0 — 2022-10-31
- 1.1.0 — 2022-10-30
- 1.0.5 — 2022-07-07
- 1.0.4 — 2022-07-07
- 1.0.3 — 2022-07-07
- 1.0.2 — 2022-07-06
- 1.0.1 — 2022-07-06
- 1.0.0 — 2022-07-06

## README

# Plop Add Files Plugin

A plugin for [Plop](https://www.npmjs.com/package/plop).
Similar to Plop's addMany action but allows for scaffolding some files without
applying handlebars templating.

## Usage

```js
import addFiles from '@d-dev/plop-add-files-plugin'
export default async function (plop) {
  await addFiles(plop)

  plop.setGenerator('some-generator', {
    description: '',
    prompts: [],
    actions: [
      {
        type: 'addFiles',
        templateFiles: 'templates/some-template/**/*',
        destination: './{{name}}/',
        base: 'templates/some-template/',
      },
    ],
  })
}
```

## Options

```ts
export type AddFilesOptions = {
  type: 'addFiles'
  templateFiles: string
  destination?: string
  base?: string
  verbose?: boolean
  force?: boolean
  skip?: (
    src: string,
    destination: string,
    answers: Record<string, unknown>,
    config: Record<string, unknown>,
  ) => boolean
  skipIfExists?: boolean
  globOptions?: glob.IOptions
  skipTemplating?: (
    src: string,
    destination: string,
    answers: Record<string, unknown>,
    config: Record<string, unknown>,
  ) => boolean
}
```

---
_Source: https://npm.io/package/@d-dev/plop-add-files-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
