markdown-it / markdown-it-emoji

Emoji syntax plugin for markdown-it markdown parser
https://markdown-it.github.io/
MIT License
727 stars 167 forks source link

Why not use gemoji directly from NPM? #28

Closed niftylettuce closed 7 years ago

niftylettuce commented 7 years ago

https://www.npmjs.com/package/gemoji

puzrin commented 7 years ago

That package is unofficial, i did not know about it. Anyway, we should regenerate light set and more compact full set. What kind of improvement do you expect?

niftylettuce commented 7 years ago

I think it is the closest we'll get to the official GitHub gemoji package (Ruby-based) -- per the docs here https://github.com/wooorm/gemoji#data it specifies that the data is crawled from the official repo; so it should be very accurate and updated. It also looks well maintained too.

Perhaps swap out our usage of the emojis (hard-coded JSON files) with this package?

puzrin commented 7 years ago
  1. It includes hardcoded data. All updates are done manually. This package also has script to update data in manual mode.
  2. In theory, it's possible to update data on install, but this package also includes browserified scripts, and i have no idea how to change those after publish.

Anyway, if you are not satisfied with existing data, you can load your own, that's supported.

niftylettuce commented 7 years ago

Completely understand your comments here - though do you agree that with the Node.js philosophy we should use a package that already does this (and is widely used)? That way the only thing you have to focus on with this package is its core functionality (integration with markdown-it).

niftylettuce commented 7 years ago

In other words - we could delete lines of code in this project - since its already handled for us in another package, that'd be nice!.

niftylettuce commented 7 years ago

Also - if this helps further with my argument, gemoji has zero dependencies in itself - so it's basically a component of what you already created, but perhaps with a nice API.

puzrin commented 7 years ago

My approach is very simple - if package works, any changes without obvious profit are a waste of time :) . I'd suggest to drop all arguments about "proper programming" and check if you still have something left. If you can explain profit after that - we can discuss it. Please, understand me right - i have too many packages to support and don't like to change those just for fun. Only when significant reasons exist.

niftylettuce commented 7 years ago

I'd suggest to drop all arguments about "proper programming" and check if you still have something left.

Yeah, it's simple - you can cut out a ton of code and you can use a package everyone else does for GitHub emojis on NPM = less code to worry about (you said it yourself- "too many packages to support").

🎉 🌮 :octocat:

puzrin commented 7 years ago

That will not change anything in maintenance, because i still need run script to generate json files. It doesn't matter, where data source is - in github repo or in npm dependency.