New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

pwa-manifest

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pwa-manifest

Create a Web Manifest for Progressive Web App with a variety of options

  • 0.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
24
decreased by-66.2%
Maintainers
1
Weekly downloads
 
Created
Source

pwa-manifest Build Status

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

Install

$ npm install --save pwa-manifest

Usage

const pwaManifest = require('pwa-manifest');

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

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

{
  "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.write.sync(dir, manifest)

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

pwaManifest.read(dir)

Returns a promise.

pwaManifest.read.sync(dir)

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

License

MIT © Jimmy Moon

Keywords

FAQs

Package last updated on 25 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc