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 🙏

© 2024 – Pkg Stats / Ryan Hefner

grunt-spritify

v0.1.4

Published

Generate sprites from retina images

Downloads

1

Readme

Generate sprites from retina images

This "Basic" task generate images from large original (@2x) sources, optimize sprite via imgo and fix half-pixel bug (retina-images with odd width/height).

Inspired by grunt-tamia-sprite.

Installation

This plugin requires Grunt 0.4. Uses grunt-tamia-sprite, grunt-imgo (optional) tasks and GraphicsMagick for node.

Install GraphicsMagick

Download and install GraphicsMagick or ImageMagick. In Mac OS X, you can simply use Homebrew and do:

brew install imagemagick
brew install graphicsmagick

Then install grunt-spritify and deps tasks:

npm install -D grunt-tamia-sprite grunt-imgo grunt-spritify

Add to your Gruntfile.js:

grunt.loadNpmTasks('grunt-tamia-sprite');
grunt.loadNpmTasks('grunt-imgo');
grunt.loadNpmTasks('grunt-spritify');

Usage

Pass folder as argument for task:

grunt spritify:${PWD}

Use ${PWD} for generate sprite in current folder.

By default task try to find <folder>/origin/*.png original files for sprite.

Configuration

Then add section named spritify inside grunt.initConfig(). See next section for details.

options

Options inside options object.

options.src

Original files for sprite. Support globbing patterns. Default: origin/*.png

options.dest

Dest folder with generated for grunt-tamia-sprite images. Default: src

options.destSprite

Sprite name. Pass string or function (first argument — dir, passed in task arguments). Default: bem-liked name notation by path <folder-name>__7up.png, support mods: block_mod__7up.png for path block/_mod/.

options.gm

Object, passed in gm options. Pass the option {imageMagick: true} to use ImageMagick instead of gm

options.sprite

Object passed to grunt-tamia-sprite task. Default:

{
    destStyl: false
}

By default grunt-tamia-sprite generate .json file with sprite variables

options.imgo

Object passed to grunt-imgo task. Pass imgo: false if need disable imgo optimization.