open-index/open-npm huggingface dataset:
npm package: @pwa/manifest
Description: Create a Web Manifest for Progressive Web App with a variety of options
Author: ragingwind
Latest version: 1.1.0

# pwa-manifest [![Build Status](https://travis-ci.org/ragingwind/pwa-manifest.svg?branch=master)](https://travis-ci.org/ragingwind/pwa-manifest)

> Creating a Web Manifest for Progressive Web App with a variety of options


## Install

```
$ npm install --save @pwa/manifest
```


## Usage

```js
const pwaManifest = require('@pwa/manifest');

(async () => {
	const manifest = await pwaManifest({
		name: 'My PWApp',
		short_name: 'My Short PWA Name',
		start_url: '/index.html?homescreen=1',
		display: 'standalone',
		background_color: '#EFEFEF',
		theme_color: '#FFEEFF'
	})
	// dump new generated manifest file if you want
	await pwaManifest.write('./', manifest);
})();
```

or we support decamelizing from camelized properties

```js
(async () => {
	const manifest = await pwaManifest({
		name: 'My PWApp',
		shortName: 'My Short PWA Name',
		startUrl: '/index.html?homescreen=1',
		display: 'standalone',
		backgroundColor: '#EFEFEF',
		themeColor: '#FFEEFF'
	});
})();
```


## API

### pwaManifest([options])

#### options

Type: `object`

Web Manifest properties you want to set. The name of options are same as member property of Web Manifest. Icons sizes are followed in [lighthouse audits](https://github.com/GoogleChrome/lighthouse/tree/9f91ab405ca89882f40a71c6aef5dc6dc08543b4/lighthouse-core/audits)
```
{
  "name": "My Powerful Progressive Web App",
  "short_name": "PWApp",
  "icons": [{
    "src": "icon-144x144.png",
    "sizes": "144x144",
    "type": "image/png"
  }, {
    "src": "icon-192x192.png",
    "sizes": "192x192",
    "type": "image/png"
  }, {
    "src": "icon-512x512.png",
    "sizes": "512x512",
    "type": "image/png"
  }],
  "start_url": "/index.html?homescreen=1",
  "display": "standalone",
  "background_color": "#FFFFFF",
  "theme_color": "#3F51B5"
}
```

### pwaManifest.write(dir, manifest)

Returns a promise.

### pwaManifest.writeSsync(dir, manifest)

Write a manifest file as `manifest.json` to dest path.

### pwaManifest.read(dir)

Returns a promise.

### pwaManifest.readSync(dir)

Read a manifest file in the name of `manifest.json` to src path

## License

MIT © [Jimmy Moon](http://ragingwind.me)
npm package: @pwa/manifest-cli
Description: Cli for Creating a Web Manifest for Progressive Web App with interactive mode
Author: ragingwind
Latest version: 1.4.0

# pwa-manifest-cli [![Build Status](https://travis-ci.org/ragingwind/pwa-manifest-cli.svg?branch=master)](https://travis-ci.org/ragingwind/pwa-manifest-cli)

> Generating manifest, icons and favicon.ico for Progressive Web App by interactive or command mode

Using in interactive mode

![](http://g.recordit.co/kwR4Dh7rM3.gif)

, or manually

```sh
 pwa-manifest --icons=./images/logo.png
```

, or with free icons from [iconfinder.com](https://iconfinder.com/) with [if-got-cli](https://github.com/ragingwind/if-got-cli)

```sh
pwa-manifest ./ ./image/icons --icons=$(if-got icons search --query=love)
```

## Install

```
$ npm install -g pwa-manifest-cli
```

## Usage

```sh
$ pwa-manifest <manifest path> <icons path> <options>
```

Get more information via help

## Examples

```shell
# show help
$ pwa-manifest --help

# Icon from iconfinder
$ pwa-manifest ./ ./image/icons --icons=$(if-got icons search --query=love --count=1)

# generate manifest.json and resized icons to `./app`.
$ pwa-manifest ./app --icons=./logo.png

# generate manifest.json to `./app` and icons to `./app/images/icons`
$ pwa-manifest ./app ./app/images/icons --icons=./logo.png

# generate manifest.json to './' with updated values of name, short_name, background_color, theme_color, orientation, and direction as well as resizes images
$ pwa-manifest --name='My Progressive Web App' --short_name='My PWA' --display=fullscreen --background_color=#fefefe --theme_color=#f44336 --orientation=any --direction=portrait --icons=./images/logo.png

# using interactive mode for generating manifest.json and resized images to current working path
$ pwa-manifest --interactive
```

## Options in details

### --icons

`path` or `http address` can be used for icons of source image. It will generated those of icons in multiple sizes (144, 192 and 512) and named by size of image into manifest. There is no way to be able to be changed by option yet. `favicon.ico` will be created from icons files at same location of `manifest.json`


## License

MIT © [Jimmy Moon](http://ragingwind.me)
npm package: @pwa/manifest-icons
Description: Generating icons for Web Manifest
Author: Jimmy Moon
Latest version: 4.0.0

# pwa-manifest-icons

> Generate icon images by Web Manifest icons property. size and location will be referenced as writing icon images

# Install

```sh
npm install --save @pwa/manifest-icons
```

# Usase

```js
const manifestIcons = require('@pwa/manifest-icons');
const manifest = {
  ...defaultManifest
};

(() => {
  const manifest.icons = await manifestIcons({
    // path for source image
    src: path.resolve(process.cwd(). './assets/icon.png'),
    // using cached images
    cache: true,
    // root path for output icons
    output: './static/manifest/icons',
    // revamp icon path with publicPath, which will be returned after resize. if null, using
    // output path
    publicPath: '/static/manifest/icons/',
    // sizes for resizing, default is 192, 512
    sizes: [192, 512]
  });
})();

// or using sync APIs powered by https://github.com/ybogdanov/node-sync

const manifest.icons = manifestIcons.sync({
  ...
});
```

# License

MIT @ [Jimmy Moon](https://ragingwind.me)
npm package: @pwa/manifest-webpack-plugin
Description: webpack plugin for Progressive web apps manifest
Author: Jimmy Moon
Latest version: 1.1.0

# pwa-manifest-webpack-plugin

> webpack plugin for generating PWA manifest.

# Install

```sh
npm install --save-dev pwa-manifest-webpack-plugin
```

# Usase

```js
const PWAManifestWebpackPlugin = require('@pwa/manifest-webpack-plugin');

module.exports = {
  ...
  plugins: [
    new PWAManifestWebpackPlugin({
      ...customManifestConfigs
    })
  ]
}
```

# License

MIT @ [Jimmy Moon](https://ragingwind.me)