Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vkontakte/sprites

Package Overview
Dependencies
Maintainers
8
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vkontakte/sprites

![Module version badge](https://img.shields.io/npm/v/@vkontakte/sprites.svg) ![License badge](https://img.shields.io/github/license/VKCOM/sprites.svg) ![Minimum Node.JS version badge](https://img.shields.io/node/v/@vkontakte/sprites.svg)

  • 0.1.6
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
8
Weekly downloads
 
Created
Source

@vkontakte/sprites

Module version badge License badge Minimum Node.JS version badge

Module for generate SVG sprites and PNG fallback that used in m.vk.com

Requirements

Inkscape (>= 0.48.5)

Node.JS (>= 8)

Install

npm install @vkontakte/sprites or yarn add @vkontakte/sprites

Demo

See demo/index.js

Generating

To generate Sprites you just need to run

generate(path, output = {}, converter, options)

  • path is place on your filesystem where module loads SVG icons
  • converter see PNG Fallback section

PNG Fallback

In this time there is single PNG converter Inkscape, but you can PR your if you need. It is simple, you just need to extend BaseConverter

To create PNG converter you need to import it

const InkscapeConverter = require("@vkontakte/sprites/src/convert/InkscapeConverter")

Then create new instance of Converter

const converter = new InkscapeConverter([1, 2], pngPath, "/opt/local/bin/inkscape"),

And use as param for generating sprites

FAQs

Package last updated on 13 Jun 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

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