项目作者: adamzerella

项目描述 :
Rollup plugin to generate a manifest.json file used to tell the browser about your web app.
高级语言: JavaScript
项目地址: git://github.com/adamzerella/rollup-plugin-manifest-json.git
创建时间: 2019-11-22T04:09:56Z
项目社区:https://github.com/adamzerella/rollup-plugin-manifest-json

开源协议:MIT License

下载


rollup-plugin-manifest-json

CI

Rollup plugin that generates a web application manifest file. This file contains the startup parameters and application defaults when a web application is launched.

Install

  1. # NPM
  2. npm i --save-dev rollup-plugin-manifest-json
  3. # Yarn
  4. yarn add -D rollup-plugin-manifest-json

Usage

  1. import manifestJSON from "rollup-plugin-manifest-json";
  2. export default {
  3. input: "main.js",
  4. plugins: [
  5. ...
  6. manifestJSON({
  7. input: "public/manifest.json", // Required
  8. // minify: true
  9. // output: "public/manifest.webmanifest"
  10. manifest: {
  11. short_name: "different-short-name"
  12. }
  13. })
  14. ]
  15. }

Options

input

Required

Type: string

Default: ""

The web application manifest file location that will be either cloned or modified and moved into the Rollup build directory.

minify

Optional

Type: boolean

Default: true

Whether or not to mangle the output file, it’s recommended to minify the file as it will reduce the file size.

manifest

Optional

Type: object

Default: {}

The key values you wish to add or modify given the existing web application manifest file. For a full list of key values to use see here.

output

Optional

Type: string

Default: public/manifest.json

Output directory to write the manifest file to, useful for building your app outside of the root rollup folder.

Contributors

Don’t be scared to raise an issue or a pull request!

Any contributions, no matter how big or small will land your picture here and be greatly appreciated ❤️


Adam Zerella
Ben McCann