{"id":15022959,"url":"https://github.com/piraces/eleventy-plugin-pwa","last_synced_at":"2025-09-30T17:30:24.931Z","repository":{"id":38297270,"uuid":"380345128","full_name":"piraces/eleventy-plugin-pwa","owner":"piraces","description":"An eleventy plugin to generate service-worker for PWA. Powered by Google Workbox","archived":false,"fork":true,"pushed_at":"2023-03-28T20:58:36.000Z","size":1364,"stargazers_count":1,"open_issues_count":10,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-17T07:26:32.355Z","etag":null,"topics":["11ty","11ty-plugin","eleventy","eleventy-plugin","npm-package","pwa","workbox"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@piraces/eleventy-plugin-pwa","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"okitavera/eleventy-plugin-pwa","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/piraces.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":"2021-06-25T20:16:11.000Z","updated_at":"2022-06-22T23:10:10.000Z","dependencies_parsed_at":"2023-02-08T12:15:50.538Z","dependency_job_id":null,"html_url":"https://github.com/piraces/eleventy-plugin-pwa","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piraces%2Feleventy-plugin-pwa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piraces%2Feleventy-plugin-pwa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piraces%2Feleventy-plugin-pwa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piraces%2Feleventy-plugin-pwa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/piraces","download_url":"https://codeload.github.com/piraces/eleventy-plugin-pwa/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234753661,"owners_count":18881435,"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":["11ty","11ty-plugin","eleventy","eleventy-plugin","npm-package","pwa","workbox"],"created_at":"2024-09-24T19:58:34.874Z","updated_at":"2025-09-30T17:30:24.220Z","avatar_url":"https://github.com/piraces.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @piraces/eleventy-plugin-pwa\n\n[![license: MIT](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](LICENSE)\n[![eleventy](https://img.shields.io/badge/staticgen-eleventy-%23707070.svg?style=flat-square)](https://11ty.io)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)\n[![codecov](https://img.shields.io/codecov/c/github/piraces/eleventy-plugin-pwa.svg?style=flat-square)](https://codecov.io/gh/piraces/eleventy-plugin-pwa)\n\n\u003e An [Eleventy](https://11ty.io) plugin to generate service worker.\n\u003e Using Google Workbox to generate service-worker.js based on your `dir.output`.\n\n### Note\n\nThis is a fork of the original work of @okitavera in [eleventy-plugin-pwa](https://github.com/okitavera/eleventy-plugin-pwa), providing up-to-date support with the latest versions of [Workbox](https://developers.google.com/web/tools/workbox/guides/get-started), [Eleventy](https://11ty.io) and other related dependencies (in order to use the latest features and advancements of these tools).\n\n## Installation\n\n```bash\nnpm i @piraces/eleventy-plugin-pwa\n```\n\n#### Add to eleventy config file\n\n```js\nconst pluginPWA = require(\"@piraces/eleventy-plugin-pwa\");\nmodule.exports = function(eleventyConfig) {\n  eleventyConfig.addPlugin(pluginPWA);\n};\n```\n\nRead more about [Eleventy plugins](https://www.11ty.io/docs/plugins/)\n\n#### Registering Service Worker\n\n```html\n// in your header templates\n\u003cscript\u003e\n  if (\"serviceWorker\" in navigator)\n    navigator.serviceWorker.register(\"/service-worker.js\");\n\u003c/script\u003e\n```\n\n#### Adding Web App Manifest\n\nRead [The Web App Manifest Guide](https://developers.google.com/web/fundamentals/web-app-manifest/)\n\n## Options\n\nYou can also pass workbox generateSW options directly into the plugin.\nFor example :\n\n```js\n// overwriting destination file and more\nconst pluginPWA = require(\"@piraces/eleventy-plugin-pwa\");\nmodule.exports = function(eleventyConfig) {\n  eleventyConfig.addPlugin(pluginPWA, {\n    swDest: \"./build/sw.js\",\n    globDirectory: \"./build\"\n  });\n};\n```\n\nRead more about it on [workbox generateSW module page](https://developers.google.com/web/tools/workbox/modules/workbox-build#full_generatesw_config)\n\n## License\n\nThis code is available under the [MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiraces%2Feleventy-plugin-pwa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiraces%2Feleventy-plugin-pwa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiraces%2Feleventy-plugin-pwa/lists"}