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

gulp-glue

v1.1.3

Published

glue for gulp, Glue is a simple command line tool to generate sprites:)

Downloads

48

Readme

gulp-glue

npm version npm download npm dependencise

Requirements

gulp-glue requires the glue and jpeg,

Please refer the Installing Glue

Usage

glue(optosn, [callback])

var glue = require('gulp-glue');

gulp.task('icon', function(done) {
  return gulp
    .src(['./sprites-retina/**/*.*'])
    .pipe(glue({
      'source': './sprites-retina',             // required
      'output': './build',                      // required
      'project': true,
      'retina': true,
      'less': './build'
    }, function(){
      done();
    }))
})

Configuration

Configuration Options

{
  "quiet": false,
  "recursive": false,                 // 递归 source 目录下的图片
  "force": false,
  "watch": false,
  "project": true,                    // 多个目录文件
  "algorithm": "square",              // 排序算法 [square|vertical|horizontal|vertical-right|horizontal-bottom|diagonal]
  "ordering": "maxside",              // 文件排列 [maxside|width|height|area|filename]
  "css": "",                          // 生成 css 的目录
  "css-template": "",                 // css 模板文件路径
  "less": "",                         // 生成 less 的目录
  "less-template": "",                // less 模板文件路径
  "scss": "",                         // 生成 scss 的目录
  "scss-template": "",                // scss 模板文件路径
  "namespace": "sprite",              // 样式前缀
  "sprite-namespace": "{sprite_name}",// 样式分类 默认为文件夹名 
  "url": "",                          // 图片地址 e.g: http://path.com/
  "cachebuster": false,               // 缓存无效化 sprite.png?hash
  "cachebuster-filename": false,      // 文件名缓存无效化 sprite-hash.png
  "separator": "-",                   // 样式分隔符
  "pseudo-class-separato": "__",      // 伪类分隔符 a__hover.png -> a:hover{}
  "img": "",                          // 生成 img 的目录
  "no-img": false,                    // 不生成 img
  "no-css": false,                    // 不生成 css
  "crop": false,                      // 移除周围透明的空间
  "padding": "",
  "margin": "",
  "png8": false,                      // 生成 png8 格式
  "ratios": "",                       // 适配类型 e.g: '2, 1.5, 1'
  "retina": false,                    // 高清模式 等于 ratios:'2, 1' 
  "html": "",                         // html目录 生成 html 展示
  "cocos2": "",
  "json": "",                         // 生成 json 的目录
  "json-format": "",                  // json 模板文件路径
  "caat": ""
}