🚀 Launch Week Day 4:Introducing the Alert Details Page: A Better Way to Explore Alerts.Learn More →
Socket
Book a DemoInstallSign in
Socket

@pwa/manifest-icons

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pwa/manifest-icons

Generating icons for Web Manifest

latest
Source
npmnpm
Version
4.0.0
Version published
Maintainers
2
Created
Source

pwa-manifest-icons

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

Install

npm install --save @pwa/manifest-icons

Usase

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

FAQs

Package last updated on 11 Aug 2019

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