npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

winningjs-svg2png

v2.0.2

Published

A Grunt build task for converting SVGs to PNGs in the varieties desired by Windows 8.

Readme

SVG-to-PNG Converter for Windows 8 Apps

Images in Windows 8 apps can scale to a number of sizes: 0.8× for certain app-manifest assets, as well as 1.4× and 1.8× for high-DPI displays. Wouldn't it be great if they supported SVGs, so you only had to package one image file?

Well, they do … sometimes. If you're writing your app in HTML5 and JavaScript, you can include SVGs in all cases you could in a normal web page. But when you interface with Windows Runtime APIs, like for example when sending a toast notification or tile update, you must use a PNG, JPG, or GIF. And the poor C++/C#/XAML users can't use SVGs at all!

This, obviously, sucks.

But there's hope! Continuing the fine tradition of WinningJS projects making Windows 8 App development suck less™, WinningJS-svg2png gives you a nice Grunt plugin for your build process to convert SVGs to PNGs in all the appropriate sizes. That way you can continue authoring using SVGs, and just use .svg.png instead of .svg when referencing the image in your code to get the correctly-scaled image automatically supplied.

WinningJS-svg2png is built on the latest in PhantomJS technology to render your SVGs using a headless WebKit instance, which we have found to produce much more accurate renderings than other solutions like GraphicsMagick or Inkscape.

Usage

You'll want to have set up a Gruntfile for your project. Inside of it, you register and configure the task like so:

grunt.loadNpmTasks("winningjs-svg2png");

grunt.initConfig({
    "WinningJS-svg2png": ["images\**\*.svg"]
});

It will automatically create PNG images as siblings to the SVGs specified in the configuration. That is, if you have a file at images/foo.svg, WinningJS-svg2png will create:

  • images/foo.scale-80.svg.png
  • images/foo.scale-100.svg.png
  • images/foo.scale-140.svg.png
  • images/foo.scale-180.svg.png

You'll probably want to add the generated files to your .gitignore or similar; a good entry would be *.svg.png.

You'll also need to be sure Visual Studio (or MSBuild, more accurately) is aware of these files and includes them in your package output. To do this, edit your .jsproj file (e.g. in Notepad). Find the main <ItemGroup> section, and add a line like

<Content Include="images\**\*.svg" />

For more general steps on integrating Grunt into a Windows 8 App's build process, check out the WinningJS-build package's instructions.