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

emoji-downloader

v1.0.1

Published

one line of code to download all the emoji images you want

Downloads

5

Readme

English

demo.gif

:rotating_light: 重要提示

我再次强调,这不是一个emoji组件库,只是一个帮助你下载所有emoji并生成与之配套的配置文件的工具。借助此工具,你可以轻松自定义自己的emoji组件库。

功能

只需一行代码,即可下载所有emoji并自动生成数据源配置文件。

你可以使用生成的数据源配置文件来构建自己的emoji组件库。

演示

这是一个简单的演示。显示的emoji数据源来自执行该脚本生成的配置文件。:pushpin: 这不是一个emoji组件库。你可以查看由该脚本生成的完整配置文件data.js

安装

npm install emoji-downloader -g

使用方法

emoji-downloader download [type...] [options]

支持的emoji类型

people nature food activity travel objects symbols flags

你可以指定要下载的emoji类型。如果未指定,则默认下载所有类型的emoji。

注意: 你指定的emoji类型的顺序将是生成的配置文件中的类型顺序(如果指定了origin选项)。

emoji-downloader download // 下载所有类型的emoji
emoji-downloader download people food // 下载people和food类型的emoji

选项

target

emoji下载的路径,默认为 ./emojis(建议使用默认值)。

origin

指定生成配置文件中emoji的来源。

如果未指定,将不会生成配置文件(当你仅仅只想下载emoji时)。

示例

emoji-downloader download --origin https://example.com

如果将origin指定为https://example.com,则生成的配置文件中的所有emoji地址都将使用它作为资源地址前缀,如下所示:

const data = {
  food: {
    resources: [
      {
        name: 'emoji_u1f32d.png',
        src: 'https://example.com/emojis/food/emoji_u1f32d.png' // 在这里查看
      },
      ...
    ],
    en_name: 'food_and_drink',
    zh_name: '食物与饮料',
    name: 'food_and_drink',
    order: 3
  },
  people: {
    resources: [
      {
        name: 'emoji_u1f383.png',
        src: 'https://example.com/emojis/people/emoji_u1f383.png' // 在这里查看
      },
      ...
    ],
    en_name: 'smile_face_and_people',
    zh_name: '笑脸与人物',
    name: 'smile_face_and_people',
    order: 1
  },
  ...
}

export default data

一般使用步骤

  1. 下载emoji并指定来源
emoji-downloader download --origin https://your-real-origin.com
  1. 将下载好的emojis资源文件夹上传至你的服务(由来源提供的服务),比如oss中,origin就是你的oss配置的域名

  2. 使用生成的配置文件封装自己的emooji组件

  3. :tada: 尽情享用