https://github.com/cyansalt/inject-web-manifest-plugin
Inject manifest.webmanifest for multiple page website.
https://github.com/cyansalt/inject-web-manifest-plugin
Last synced: 11 days ago
JSON representation
Inject manifest.webmanifest for multiple page website.
- Host: GitHub
- URL: https://github.com/cyansalt/inject-web-manifest-plugin
- Owner: CyanSalt
- License: mit
- Created: 2019-12-25T02:48:47.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-26T07:19:30.000Z (over 6 years ago)
- Last Synced: 2025-01-02T16:34:17.535Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# inject-web-manifest-plugin
Inject manifest.webmanifest for multiple page website.
## Install
# html-webpack-plugin is required
npm install html-webpack-plugin
npm install inject-web-manifest-plugin
## Usage
```js
const InjectWebManifestPlugin = require('inject-web-manifest-plugin');
// for example
new InjectWebManifestPlugin({
name: 'dist/[page].[hash:8].webmanifest',
template: 'src/manifest.webmanifest',
}),
```
## Options
| Name | Description |
| ---- | ---- |
| `name` | Target compilation path of manifest file. Default: `manifest.[hash:8].webmanifest`. |
| | Supported variables: |
| | - `[hash:{limit}]`: will be replaced with the manifest file hash. `limit` must be greater than `1` and be less than `16`.
| | - `[page]`: will be replaced with basename of file output by `HtmlWebpackPlugin`.
| `template` | Path of manifest source file. Default: `manifest.webmanifest`. |
| `assign` | **Optional**. Overwrite properties in source file for specific pages.
| | Should be an object with `[page]` as key and content of web manifest as value.
# License
MIT. See [LICENSE](./LICENSE).