Code Monkey home page Code Monkey logo

esbuild-clean-plugin's Introduction

esbuild-clean-plugin

npm build

An esbuild plugin to clean your build folder.

Installation

npm install esbuild-clean-plugin

Requirements

  • Node 14.15.0 (LTS) or later.
  • esbuild 0.11.18 or later.

Usage

import { build } from 'esbuild';
import { cleanPlugin } from 'esbuild-clean-plugin';

build({
  bundle: true,
  entryPoints: [path.resolve(__dirname, 'index.js')],
  metafile: true,
  outdir: path.resolve(__dirname, 'dist'),
  watch: true,
  plugins: [cleanPlugin({
      // Plugin options
  })],
});

Note: The metafile and outdir options must be set for the plugin to have any effect.

Options

  • dry (default false) - Run the plugin in dry mode, not deleting anything. Most useful together with the verbose option to see what would have been deleted.
  • initialCleanPatterns (default ['**/*']) - File patterns to remove on plugin setup, useful to clean the build directory before creating new files. Pass an empty array to disable it.
  • verbose (default false) - Print all files that have been deleted after each run.

esbuild-clean-plugin's People

Contributors

enisdenjo avatar jwilsson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

franklx say8425

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.