{"id":24466210,"url":"https://github.com/xuyizhe/postsw","last_synced_at":"2025-07-04T18:10:54.378Z","repository":{"id":39659582,"uuid":"279472215","full_name":"xuyizhe/postsw","owner":"xuyizhe","description":"Simple post-processing Service Worker.","archived":false,"fork":false,"pushed_at":"2023-01-06T11:26:02.000Z","size":341,"stargazers_count":1,"open_issues_count":7,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-01T13:43:16.179Z","etag":null,"topics":["cli","service-worker","workbox"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xuyizhe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-14T03:32:51.000Z","updated_at":"2023-03-08T04:16:18.000Z","dependencies_parsed_at":"2023-02-05T23:46:13.108Z","dependency_job_id":null,"html_url":"https://github.com/xuyizhe/postsw","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/xuyizhe/postsw","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuyizhe%2Fpostsw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuyizhe%2Fpostsw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuyizhe%2Fpostsw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuyizhe%2Fpostsw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xuyizhe","download_url":"https://codeload.github.com/xuyizhe/postsw/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuyizhe%2Fpostsw/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263594623,"owners_count":23485877,"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":["cli","service-worker","workbox"],"created_at":"2025-01-21T06:13:56.259Z","updated_at":"2025-07-04T18:10:54.353Z","avatar_url":"https://github.com/xuyizhe.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# postsw\n\nSimple post-processing Service Worker.\n\n## Installation\n```shell\nnpm install -g postsw\n```\n\n## Getting started\n\n### Register Service Worker\nAdd the following code to your project.\n```javascript\nif ('serviceWorker' in navigator) {\n  window.addEventListener('load', () =\u003e {\n    navigator.serviceWorker.register('/sw.js');\n  });\n}\n```\n\nOr use with [`register-service-worker`](https://www.npmjs.com/package/register-service-worker)\n\n### Generate `sw.js`\n```shell\npostsw ./your_project_dist_dir\n\n# postsw --help\n```\n\n### Server configuration(optional)\n```shell\nlocation / {\n  index /index.html\n  add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';\n  expires off;\n}\n\nlocation ~ (sw.js)$ {\n  add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';\n  expires off;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxuyizhe%2Fpostsw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxuyizhe%2Fpostsw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxuyizhe%2Fpostsw/lists"}