Skip to content
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.

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

License

Notifications You must be signed in to change notification settings

gsdnano/webpack-delete-after-emit

Repository files navigation

webpack-delete-after-emit

GitHub license Greenkeeper badge 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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published