{"id":17160177,"url":"https://github.com/nitsan-technologies/pwa","last_synced_at":"2025-03-24T15:11:58.458Z","repository":{"id":65145329,"uuid":"583234321","full_name":"nitsan-technologies/pwa","owner":"nitsan-technologies","description":"Simple and easy to integrate PWA","archived":false,"fork":false,"pushed_at":"2024-02-22T14:05:25.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-05T02:02:10.657Z","etag":null,"topics":[],"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/nitsan-technologies.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":"2022-12-29T06:54:38.000Z","updated_at":"2024-02-22T14:03:55.000Z","dependencies_parsed_at":"2023-02-13T18:10:32.101Z","dependency_job_id":null,"html_url":"https://github.com/nitsan-technologies/pwa","commit_stats":null,"previous_names":["nitsan-technologies/pwa"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitsan-technologies%2Fpwa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitsan-technologies%2Fpwa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitsan-technologies%2Fpwa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitsan-technologies%2Fpwa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nitsan-technologies","download_url":"https://codeload.github.com/nitsan-technologies/pwa/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245294774,"owners_count":20591909,"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":[],"created_at":"2024-10-14T22:23:54.248Z","updated_at":"2025-03-24T15:11:58.434Z","avatar_url":"https://github.com/nitsan-technologies.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ns-pwa\n\n\u003e Simple and easy to integrate most popular PWA feature to your love website. Please perform easy installation guide below to quickly enable PWA feature.\n\n**Features**:\n\n- Plug-n-play PWA feature\n- Easy to install PWA\n- Pre-configured Package\n- Customizable and Extendible\n- Access content on any device\n- Access web content even when the internet connection is weak or not available\n- Load websites quickly\n- Benefit from a high-quality user experience\n\n**Advantages**:\n\n- Fast, Reliable, Engaging\n- Mobile-First Approach\n- Save More Than 75%\n- Good for SEO\n- Your Website Feels like Native-Mobile\n\n\n## Table of Contents\n\n- [Demo](https://t3planet.com)\n- [Install](#install)\n- [Usage](#usage)\n- [Browser Support](#browser-support)\n- [FAQs](#faqs)\n- [Contribute](#contribute)\n- [Changelog](#changelog)\n- [License](#license)\n\n## Install\n\n```sh\n# You can install lozad with npm\n$ npm i @nitsantechnologies/ns-pwa\n\n# Alternatively you can use Yarn\n$ yarn add @nitsantechnologies/ns-pwa\n```\n\n## Usage\n\nThen with a module bundler like rollup or webpack, use as you would anything else:\n\n## Initialization\n```javascript\n// using ES6 modules\nimport NsPwa from \"@nitsantechnologies/ns-pwa\";\n\nconst NsPwaVar = new NsPwa({\n  //Add Your Site/App Short Name\n  pwa_short_name: \"\u003cApplication Short Name\u003e\",\n\n  // Add your Site/App Name\n  pwa_name: \"\u003cApplication Name\u003e\",\n\n  // Add your Site/App Start URL (Like: (/), (https://example.com/), (https://example.com/blog))\n  pwa_start_url: \"Main URL (like: / or https://example.com/)\",\n\n  // Add your Site/App Background Color (Like: #000, #fff, RGB(0,0,0))\n  pwa_background_color: \"Background Color\",\n\n  // Add your Site/App Display\n  pwa_display: \"standalone\",\n\n  // Add your Site/App Theme Color (Like: #000, #fff, RGB(0,0,0))\n  pwa_theme_color: \"Theme Color\",\n\n  // Add your Site/App Icons\n  pwa_icon_48: \"/pwa/icon/pwa-48.png\",\n  pwa_icon_72: \"/pwa/icon/pwa-72.png\",\n  pwa_icon_96: \"/pwa/icon/pwa-96.png\",\n  pwa_icon_144: \"/pwa/icon/pwa-144.png\",\n  pwa_icon_192: \"/pwa/icon/pwa-192.png\",\n  pwa_icon_512: \"/pwa/icon/pwa-512.png\",\n  \n  //You can see your JSON Code with this option\n  pwa_get_json: true,\n});\n```\n\n## Service-worker.js\n\n```javascript\n//Add Code On Service-Worker JS\nconst dataCacheName = 'App Data';\nconst cacheName = 'App';\nconst filesToCache = [\n  '/',\n  '/pwa/pwa.png',\n];\n\n//install the sw\nself.addEventListener('install', function (e) {\n  console.log('[ServiceWorker] Install');\n  e.waitUntil(\n    caches.open(cacheName).then(function (cache) {\n      console.log('[ServiceWorker] Caching app shell');\n      return cache.addAll(filesToCache);\n    })\n  );\n});\n\n\nself.addEventListener('activate', function (e) {\n  console.log('[ServiceWorker] Activate');\n  e.waitUntil(\n    caches.keys().then(function (keyList) {\n      return Promise.all(keyList.map(function (key) {\n        if (key !== cacheName \u0026\u0026 key !== dataCacheName) {\n          console.log('[ServiceWorker] Removing old cache', key);\n          return caches.delete(key);\n        }\n      }));\n    })\n  );\n  return self.clients.claim();\n});\n\n\nself.addEventListener('fetch', function (e) {\n  console.log('[Service Worker] Fetch', e.request.url);\n  e.respondWith(\n    caches.match(e.request).then(function (response) {\n      return response || fetch(e.request);\n    })\n  );\n});\n```\n\n## Add your Code At \u003cHEAD\u003e Tag With All proper Data\n\n```html\n\u003c!-- You can create JSON file Manually with *pwa_get_json* This option--\u003e\n\u003clink rel=\"manifest\" href=\"/pwa/manifest.json\" /\u003e\n\u003cmeta name=\"apple-mobile-web-app-capable\" content=\"yes\" /\u003e\n\u003cmeta name=\"apple-mobile-web-app-status-bar-style\" content=\"black\" /\u003e\n\u003c!-- Add Your Site Name on Content--\u003e\n\u003cmeta name=\"apple-mobile-web-app-title\" content=\"Your_site\" /\u003e\n\u003c!-- Add your ISO PNG Path --\u003e\n\u003clink rel=\"apple-touch-icon\" href=\"/pwa/pwa.png\" /\u003e\n\u003cmeta name=\"msapplication-TileImage\" content=\"/pwa/pwa.png\" /\u003e\n\u003cmeta name=\"theme-color\" content=\"#000\" /\u003e\n\u003cmeta name=\"msapplication-TileColor\" content=\"#000\" /\u003e\n```\n\n## Browser Support\n\nAvailable in [latest browsers](http://caniuse.com/#feat=intersectionobserver).\n\n## FAQs\n\n- You can generate your PWA Icons/Images form here \u003e [PWA Icons](https://tools.crawlink.com/tools/pwa-icon-generator/).\n- We are Added Service Worker JS Code So you can add Easily\n- We use ES6 modules\n- Compatible With All Type Front-end Project\n- You need To add files Manually (Because Some Limitation)\n- PWA Usefull for Better SEO/UI-UX\n- PWA Create One type of App For your Website\n\n## Contribute\n\nInterested in contributing features and fixes?\n\n[Excited to receive your PR](https://github.com/nitsan-technologies/pwa).\n\n## License\n\n[MIT](LICENSE) © [NITSAN Technologies](https://nitsantech.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitsan-technologies%2Fpwa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnitsan-technologies%2Fpwa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitsan-technologies%2Fpwa/lists"}