{"id":15853225,"url":"https://github.com/fabioricali/staticbuster","last_synced_at":"2025-04-01T18:42:40.637Z","repository":{"id":57370162,"uuid":"113503209","full_name":"fabioricali/staticbuster","owner":"fabioricali","description":"Cache buster for static resources in HTML pages","archived":false,"fork":false,"pushed_at":"2018-03-13T21:03:27.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-13T22:07:56.170Z","etag":null,"topics":["cache","cache-buster","cachebuster","cachebusting"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fabioricali.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-07T22:05:48.000Z","updated_at":"2018-03-13T21:03:21.000Z","dependencies_parsed_at":"2022-09-26T16:41:06.758Z","dependency_job_id":null,"html_url":"https://github.com/fabioricali/staticbuster","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabioricali%2Fstaticbuster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabioricali%2Fstaticbuster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabioricali%2Fstaticbuster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabioricali%2Fstaticbuster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabioricali","download_url":"https://codeload.github.com/fabioricali/staticbuster/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246693120,"owners_count":20818813,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cache","cache-buster","cachebuster","cachebusting"],"created_at":"2024-10-05T19:03:39.076Z","updated_at":"2025-04-01T18:42:40.615Z","avatar_url":"https://github.com/fabioricali.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003ch1\u003estaticbuster\u003c/h1\u003e\nCache buster for static resources in HTML pages.\n\u003cbr/\u003e\u003cbr/\u003e\n\u003ca href=\"https://travis-ci.org/fabioricali/staticbuster\" target=\"_blank\"\u003e\u003cimg src=\"https://travis-ci.org/fabioricali/staticbuster.svg?branch=master\" title=\"Build Status\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://opensource.org/licenses/MIT\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-MIT-yellow.svg\" title=\"License: MIT\"/\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n## Installation\n\n### Node.js\n```\nnpm install staticbuster --save\n```\n\nImagine this scenario:\n\n**index.html**\n\n```html\n\u003c!DOCTYPE html\u003e\n    \u003chtml\u003e\n        \u003chead\u003e\n            \u003cscript src=\"res/html2canvas.js\"\u003e\u003c/script\u003e\n            \u003clink rel=\"stylesheet\" href=\"res/colpick.css\"\u003e   \n```\n\nYou may have cache problems! staticbuster adds a cache buster for each resource. For example:\n\n```html\n            \u003cscript src=\"res/html2canvas.js?_sb=1512833988607\"\u003e\u003c/script\u003e\n            \u003clink rel=\"stylesheet\" href=\"res/colpick.css?_sb=1512833988607\"\u003e   \n```\n\n## Usage\n\n```javascript\nconst staticbuster = require('staticbuster');\n\nstaticbuster({\n    file: 'path/index.html'\n})\n.then(() =\u003e console.log('ok'))\n.catch(err =\u003e console.err(err));\n```\n\n\n### Options\n\nName | Type | Default | Description\n-|-|-|-\nfile | string or array of string |  | File(s) to process\ndest | string |  | Optional, file destination\nbusterParam | string | _sb | Optional, buster param\nbusterValue | string | timestamp | Optional, buster value\nsaveCopy | boolean | true | Optional, save a copy\n\n### CLI\n```\n$ staticbuster --help\n\n  Options:\n\n    -V, --version              output the version number\n    -f, --file \u003cfileName\u003e      file to process\n    -d, --dest [destination]   optional file destination\n    -b, --saveCopy [boolean]   optional save a copy\n    -p, --busterParam [param]  optional buster param, default is _sb\n    -v, --busterValue [value]  optional buster value, default is the timestamp\n    -h, --help                 output usage information\n\n```\n\n## Changelog\nYou can view the changelog \u003ca target=\"_blank\" href=\"https://github.com/fabioricali/staticbuster/blob/master/CHANGELOG.md\"\u003ehere\u003c/a\u003e\n\n## License\nstaticbuster is open-sourced software licensed under the \u003ca target=\"_blank\" href=\"http://opensource.org/licenses/MIT\"\u003eMIT license\u003c/a\u003e\n\n## Author\n\u003ca target=\"_blank\" href=\"http://rica.li\"\u003eFabio Ricali\u003c/a\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabioricali%2Fstaticbuster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabioricali%2Fstaticbuster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabioricali%2Fstaticbuster/lists"}