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

emogeez-generator

v0.21.1

Published

Build an emojis sprite and stylesheet file from emojis datas collected from both emojipedia.org and unicode.org website

Downloads

128

Readme

Emogeez generator 👷‍♂️

This module is a tool for building emojis sprites for many themes to be used on web apps. It gathers required informations from the website Emojipedia like images of all emojis in different themes and build an sprite image with all the emojis and the stylesheet file associated with all the emojis positions. To be used on web app easily, it build a JSON file with useful informations about each emojis for each categories. You can after this use the emogeez-react-components components library to display them on your app.


Themes that can be used: apple, emojione, emojidex, emojipedia, facebook, google, htc, lg, messenger, microsoft, mozilla, samsung, softbank, twitter, whatsapp

Once the generator's work is done, you find the generated files into the specified folder (default in the current working directory). For each themes, you will find a .json, .png and .sass or .less and a .css file.

generator

The PNG

apple.png

The Stylesheet

The emojis positions are stored in this stylesheet. Each emoji has a classname based on his shortname and prefixed by the user (default emojis-).

[class^="emojis-"], [class*=" emojis-"] {
    background: transparent url("emojis/apple/apple.png") 0 0 no-repeat;
    display: inline-block;
    height: 48px;
    background-size: 1392px 1392px;
    width: 48px;
    vertical-align: middle;
}

.emojis-grapes {
    background-position: 48px 0px;
}
.emojis-melon {
    background-position: 960px 288px;
}
.emojis-watermelon {
    background-position: 0px 48px;
}
.emojis-tangerine {
    background-position: 48px 48px;
}
.emojis-lemon {
    background-position: 96px 0px;
}
// ...

The JSON

It stores useful informations about each emoji.

"father-christmas": {
    "symbol": "🎅",
    "name": "father-christmas",
    "fullName": "Santa Claus",
    "category": "people",
    "unicode": "1f385",
    "shortnames": [
      "santa"
    ],
    "modifiers": {
      "father-christmas-type-1-2": {
        "parent": "father-christmas",
        "fullName": "Santa Claus: Light Skin Tone",
        "name": "father-christmas-type-1-2",
        "symbol": "🎅🏻",
        "category": "people",
      },
      "father-christmas-type-3": {
        "parent": "father-christmas",
        "fullName": "Santa Claus: Medium-Light Skin Tone",
        "name": "father-christmas-type-3",
        "symbol": "🎅🏼",
        "category": "people",
      },
      "father-christmas-type-4": {
        "parent": "father-christmas",
        "fullName": "Santa Claus: Medium Skin Tone",
        "name": "father-christmas-type-4",
        "symbol": "🎅🏽",
        "category": "people",
      },
      "father-christmas-type-5": {
        "parent": "father-christmas",
        "fullName": "Santa Claus: Medium-Dark Skin Tone",
        "name": "father-christmas-type-5",
        "symbol": "🎅🏾",
        "category": "people",
      },
      "father-christmas-type-6": {
        "parent": "father-christmas",
        "fullName": "Santa Claus: Dark Skin Tone",
        "name": "father-christmas-type-6",
        "symbol": "🎅🏿",
        "category": "people",
      }
    },
    "shortname": "santa"
    // ...

if an emoji owns modifiers (different version of an emoji like skin color etc...) of course you will find the modifiers version of emojis (black skin etc...). They are stored into the original emoji modifiers key if any.

How to use

Installation

$ yarn i emogeez-generator
Run

Run help command to have details

$ yarn run -h

Run it

$ yarn run -s 24

###Options preproc

--preproc the css preprocessor you want to use (DEFAULT: sass). For now only sass and less are supported.

destination

-d, --destination the place when files will be writen (DEFAULT: current working directory)

size

-s, --size The sprite's height (DEFAULT: 24)

prefix

-p, --prefix The classnames prefix on stylesheet file (DEFAULT: emoji)

cache

-c, --cache Force using cache. In fact the program will get about 20k images and at least 2k html pages, so it caches datas on the first use and if you launch it again, it could use datas on the ``tmp/` folder. Don't use it if you want fresh new datas from the websites. (DEFAULT: false)

Notes

This is an early version. I know it needs some fixes and optimization but it works. Please contribute if you found it useful! ❤️

return 'enjoy';