https://github.com/cjpatoilo/pwa-installer
Zero-configuration for installing PWA features.
https://github.com/cjpatoilo/pwa-installer
cli manifest offline precache progressive-web-app pwa pwa-features pwa-installer service-worker sw-precache webapp
Last synced: about 2 months ago
JSON representation
Zero-configuration for installing PWA features.
- Host: GitHub
- URL: https://github.com/cjpatoilo/pwa-installer
- Owner: cjpatoilo
- License: mit
- Created: 2017-08-08T13:20:03.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2023-02-27T01:20:07.000Z (about 2 years ago)
- Last Synced: 2025-02-28T07:33:14.544Z (2 months ago)
- Topics: cli, manifest, offline, precache, progressive-web-app, pwa, pwa-features, pwa-installer, service-worker, sw-precache, webapp
- Language: JavaScript
- Homepage: https://cjpatoilo.com/pwa-installer
- Size: 540 KB
- Stars: 10
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Contributing: .github/contributing.md
- Funding: .github/funding.yml
- License: license
Awesome Lists containing this project
README
> Zero-configuration for installing PWA features.
[](https://travis-ci.org/cjpatoilo/pwa-installer?branch=master)
[](https://ci.appveyor.com/project/cjpatoilo/pwa-installer)
[](https://www.codacy.com/app/cjpatoilo/pwa-installer/dashboard)
[](https://david-dm.org/cjpatoilo/pwa-installer)
[](https://www.npmjs.com/package/pwa-installer)
[](https://www.npmjs.com/package/pwa-installer)
[](https://gitter.im/cjpatoilo/pwa-installer)## Why it's awesome
Zero-configuration for installing PWA features. Although [sw-precache](https://github.com/GoogleChromeLabs/sw-precache) works great as a light-weight tool to quickly install service worker support, it currently does not provide much functionality for installing specific "features".
**Features**
- [ ] Read config from `pwa.config.js`
- [ ] Inject preload e prefetch tags on html files
- [ ] Generate manifesto.json file
- [x] Generate `service-worker.js` (files)
- [x] Generate hashs in scripts and styles files (files)
- [x] Automate `service-worker.js` call in your `html` files## Install
**Install with npm**
```sh
$ npm i pwa-installer
```**Install with Yarn**
```sh
$ yarn add pwa-installer
```**Run with npx (without installing)**
```sh
$ npx pwa-installer
```_Note: Install this npm package with the flag `-g` or `--global` for global use. Install with the flag `-D` or `--save-dev` for add the package as a devDependency of your project._
## Usage
```
$ pwa-installer --helpUsage:
$ pwa-installer [] []
Options:
-h, --help Display help information
-v, --version Output version
-c, --config Display help informationExamples:
$ pwa-installer
$ pwa-installer dist/index.html
$ pwa-installer dist --config=pwa.config.js
```Note: Directory is required
## Contributing
Want to contribute? Follow these [recommendations](https://github.com/cjpatoilo/pwa-installer/contribute).
## License
Designed with ♥ by [CJ Patoilo](https://twitter.com/cjpatoilo). Licensed under the [MIT License](https://cjpatoilo.com/license).