Socket
Socket
Sign inDemoInstall

@pwa/manifest-icons

Package Overview
Dependencies
4
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @pwa/manifest-icons

Generating icons for Web Manifest


Version published
Weekly downloads
277
increased by237.8%
Maintainers
2
Created
Weekly downloads
 

Readme

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

Last updated on 11 Aug 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc