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

pcchat-icon-builder

v2.0.1

Published

An icon generator to generate all the icon files needed for electron packaging

Downloads

5

Readme

pcchat-icon-builder

** 项目中应用的logo在native端和UI端都有用到,两个端的图标所在的路径是相互分离的。 native端指windows/macOS任务栏、应用图标等,UI端指登陆页处蓝叮标识,理想状态下windows端需要一个icon.ico文件(macOS对应的是icon.icns)即可。但是实际应用中,只使用icon.ico文件会有一些问题。如:windows右下角的任务栏,使用icon.ico文件在有新消息闪动图标的时候,有些电脑会出现卡顿问题,采用只包含16x16尺寸的ico后明显好转。另外任务栏处的ico还需要根据在线状态显示忙碌、离开等状态,这又需要特殊的ico文件。 UI端使用logo的地方较少,且通常只要尺寸对就没有太大问题。 使用到logo标识的具体地方参见:https://www.yuque.com/docs/share/eda9a924-fbdc-4dc1-b150-2d9bd78ee27e?# 《蓝叮应用相关的图标记录》 另外,蓝叮应用目前支持开发环境、测试环境、生产环境三环境打包,且能同时运行这三个环境的应用程序,这也意味着这三个环境的应用程序需要不同的logo加以区分。 所以,遇到换logo的时候,不仅UI设计头痛,开发的工作量也不小。

本项目根据一张1024x1024的PNG图片自动生成其他所有的图标文件。

**

使用方法

安装

npm install --save-dev git+http://niwl:[email protected]/dev2/im/pcchat-ico-builder.git#5e9b0ea9dcf9a564b2f363c0985a1c1e8b39955d

使用

pcchat-icon-builder --input=/absolute/path/1024.png --output=./relative/path/to/folder --pcEnv=product --projectRoot=/absolute/path/projectRoot
or
./node_modules/.bin/pcchat-icon-builder --input=${LOGO_INPUT} --output=${LOGO_OUTPUT} --pcEnv=product --projectRoot=${PROJECT_REPO}

参数说明

--output, -o = [String] 产出物路径
--input, -i = [String] 1024x1024的png原图
--pcDev = [String] 开发模式 dev/test/product,不同模式的图标分别放在icons_dev, icons_test, icons目录下
--projectRoot 父项目的路径(为了取到离开和忙碌的小图标路径)

说明

输入文件应为1024px x 1024px或更大尺寸,确保宽高比为1:1。

Output structure

[output dir]
    -[icons]
        -[ico]
            - tray.ico
            - offline_128.ico
            - offline_256.ico
            ...
        -[mac]
            - icon.icns
        -[png]
            - 16x16.png
            - [email protected]
            - 24x24.png
            - [email protected]
            ...
            ...
        -[win]
            -icon.ico
    -[icons_dev]
        ...
    -[icons_test]
        ...

TODO

  • 1、分析ico格式的file_list
  • 2、dev或test模式下优先查询是否有对应的1024文件,如果没有则默认生成
  • 3、macOS的菜单栏(黑暗模式+正常模式)