Installation
Node.js
npm install staticbuster --save
Imagine this scenario:
index.html
You may have cache problems! staticbuster adds a cache buster for each resource. For example:
Usage
const staticbuster = ; ;
Options
Name | Type | Default | Description |
---|---|---|---|
file | string or array of string | File(s) to process | |
dest | string | Optional, file destination | |
busterParam | string | _sb | Optional, buster param |
busterValue | string | timestamp | Optional, buster value |
saveCopy | boolean | true | Optional, save a copy |
CLI
$ staticbuster --help
Options:
-V, --version output the version number
-f, --file <fileName> file to process
-d, --dest [destination] optional file destination
-b, --saveCopy [boolean] optional save a copy
-p, --busterParam [param] optional buster param, default is _sb
-v, --busterValue [value] optional buster value, default is the timestamp
-h, --help output usage information
Changelog
You can view the changelog here
License
staticbuster is open-sourced software licensed under the MIT license