Skip to content

A script that removes all files from the dist directory. Useful when using Parcel Bundler before using the build command, as files are bundled in the dist directory with unique serial numbers and are not overwritten.

Notifications You must be signed in to change notification settings

stefanbobrowski/parcel-dist-cleaner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Parcel Dist Cleaner

A script that removes all files from the dist directory.

Useful when using Parcel Bundler before using the parcel build command, as files are bundled in the dist directory with unique serial numbers and are not overwritten.

As installed package:

npm i parcel-dist-cleaner

Node useage:

node ./node_modules/parcel-dist-cleaner/distCleaner

NPM script useage with Parcel: (package.json)

...
  "scripts": {
    "start": "parcel src/index.html --open",
    "clean": "node ./node_modules/parcel-dist-cleaner/distCleaner",
    "prod": "npm run clean && parcel build src/index.html"
  },
...

Optionally can move distCleaner.js to the root directory to make it nicer:

node distCleaner

Author

Stefan Bobrowski

stefanbobrowski.com

About

A script that removes all files from the dist directory. Useful when using Parcel Bundler before using the build command, as files are bundled in the dist directory with unique serial numbers and are not overwritten.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published