Coder Social home page Coder Social logo

clean-webpack-plugin's Introduction

Clean for webpack

A webpack plugin to remove/clean your build folder(s) before building

Build Status Coveralls Status

Installation

npm install clean-webpack-plugin --save-dev

Example Webpack Config

var CleanWebpackPlugin = require('clean-webpack-plugin');

module.exports = {
  plugins: [
    new CleanWebpackPlugin(['dist', 'build'], {
      root: '/full/project/path',
      verbose: true, 
      dry: false,
      exclude: ['shared.js']
    })
  ]
}

Usage

new CleanWebpackPlugin(paths [, {options}])

Paths (Required)

An [array] of string paths to clean

['dist', 'build']

Options and defaults (Optional)

{
  "root": "[location of webpack.config]", // An absolute path for the root.
  "verbose": true, // Write logs to console.
  "dry": false, // Use boolean "true" to test/emulate delete. (will not remove files).
                // (Default: "false", remove files)
  "exclude": ["files", "to", "ignore"] // Instead of removing whole path recursively,
                                       // remove all path's content with exclusion of provided immediate children.
                                       // Good for not removing shared files from build directories.
}

License

http://www.opensource.org/licenses/mit-license.php

clean-webpack-plugin's People

Contributors

alextreppass avatar bebraw avatar chrisblossom avatar gajus avatar johnagan avatar kevinlaw91 avatar mhuggins avatar zdanowiczkonrad avatar

Watchers

 avatar

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.