@d-dev/plop-add-files-plugin
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published

Plop Add Files Plugin

A plugin for Plop. Similar to Plop's addMany action but allows for scaffolding some files without applying handlebars templating.

Usage

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

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
}

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.2.10latest

Version History

VersionDownloads (Last 7 Days)Published
1.2.10
1.2.00
1.1.00
1.0.50
1.0.40
1.0.30
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i @d-dev/plop-add-files-plugin

Weekly Downloads

0

Version

1.2.1

License

MIT

Unpacked Size

27.5 kB

Total Files

8

Last publish

Collaborators

  • dworthen