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

qmui-images-distribution

v1.0.5

Published

适用于 QMUI 图片管理方式的辅助工具,自动把 sketch 导出的切片按 QMUI 要求改名并分发到各个目录

Downloads

2

Readme

qmui-images-distribution

自动把 sketch 导出的切片按 QMUI 要求改名并分发到各个目录。由于 sketch 中输出的切图通常是按照 xxx.png,xxx_2x.png,xxx_3x.png 这样输出,而 QMUI 框架中要求多倍图的文件名相同,即不带"_2x"或“_3x”这类后缀,并放置到不同的目录中,因此造成不便,这个工具帮助把切图重命名并集中分发到对应的目录中。

Installation

npm install --save-dev qmui-images-distribution 

Usage

第一次使用时应该先运行一次 gulp init,这个任务会帮助创建配置表,配置表会放置在 qmui-images-distribution 的上一层目录,然后需要按照图片目录创建对应的字典,例如项目中图片目录结构如下:

images
├── commonImages
├── commonImages_2x
├── icons
├── icons_2x
├── mobile
├── mobile_2x
├── mobile_3x
├── qmui-images-distribution // 本工具的目录
└── config.json              // 配置表

则可以这样编写配置表:

{
  "comment" : "图片目录名与关键字的配对",
  "icon": "icons",
  "common": "commonImages",
  "mobile": "mobile"
} 

保存配置表后则可以使用,例如 sketch 中切图输出共有 close.png,close_2x.png 两张图片,需要分别放置到 icons 和 icons_2x 两个目录中,则可以先把切图放置到 qmui-images-distribution/source 中,然后执行以下命令:

gulp --d icon 

同理,如果有三张切图 logo.png,logo_2x.png,logo_3x.png 需要分别放置到 mobile,mobile_2x 和 mobile_3x 三个目录中,则可以这样操作:

gulp --d mobile

在 qmui-images-distribution 目录下运行以下命令可以查看完整的使用菜单

gulp help