1.1.14 • Published 1 month ago

@sprout2000/esbuild-copy-plugin v1.1.14

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

@sprout2000/esbuild-copy-plugin

jest GitHub top language npm

An esbuild plugin to copy static files from a source directory to a destination directory.

* This plugin is a typed and fully tested version of @nickjj's esbuild-copy-static-files.

Installation

npm install --save-dev @sprout2000/esbuild-copy-plugin

You will need to have Node.js >=16.7 installed.

Usage

import { build } from "esbuild";
import { copyPlugin } from "@sprout2000/esbuild-copy-plugin";

build({
  plugins: [
    copyPlugin({
      src: "./assets/icon.png",
      dest: "./dist/logo.png",
    }),
  ],
});

API

interface CopyPluginOptions extends fs.CopySyncOptions {
  src?: string;
  dest?: string;
}
optiondefault
src?: string"assets"
dest?: string"dist"
dereference?: booleanfalse
errorOnExist?: booleanfalse
filter?: (src, dest) => booleanundefined
force?: booleanfalse
preserveTimestamps?: booleanfalse
recursive?: booleantrue
verbatimSymlinks?: booleanfalse

See fs.CopySyncOptions in Node.js LTS for more details.

Unit test

# clone this repo, and install devDependencies...
git clone https://github.com/sprout2000/esbuild-copy-plugin.git
cd esbuild-copy-plugin
npm install

# run the test
npm test
1.1.14

1 month ago

1.1.13

4 months ago

1.1.9

11 months ago

1.1.12

10 months ago

1.1.11

10 months ago

1.1.10

10 months ago

1.1.8

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago