1.0.5 • Published 7 years ago

webpack-delete-after-emit v1.0.5

Weekly downloads
1,471
License
MIT
Repository
github
Last release
7 years ago

webpack-delete-after-emit

GitHub license Github All Releases npm

Deletes globs after webpack is done emitting files. Used for cleaning up post-webpack for deployments.

Installation

Install via NPM.

npm i -D webpack-delete-after-emit

Usage

Require and add to plugins section of webpack.

const WebpackDeleteAfterEmit = require('webpack-delete-after-emit');

new WebpackDeleteAfterEmit({
    globs:['*.debug.js'] //Relative to webpack output path
})

With some options

new WebpackDeleteAfterEmit({
    globs:['*.debug.js'],
    verbose: true,
    doStats: true,
    dryRun: false
})

Options

  • globs Array of globs, relative to webpack output path. Array default is []
  • Verbose Verbose output. Boolean default is false
  • doStats Outputs a stats file. Boolean default is false
  • statsPath Relative to the webpack output folder, the stats file path. Only used if doStats is set to true. String default is ./dist/stats-webpack-delete-after-emit.json
  • dryRun If true will not delete files. Boolean default is false

Misc

Common usage is post webpack cleansing for automatic one-command build & deployment for static websites hosted on S3.