Typescript Refactor and Leaderboards

in #utopian-io8 years ago (edited)

Link to PR here

New Features

  • Added support for typescript and es6 syntax
  • Added a bunch of new config files
    • tsconfig
    • preprocessor
    • tslint
  • Added a leaderboard module

Implementation

The typescript refactor was a major code overhaul, which not only reworked everything into typescript but also began to organize the code with separations of concerns in mind. The data file holds all information regarding the steem blockchain and the nowplaying database. The main file is only used for configurations and running functions from other modules.

The leaderboard was created by sorting all contestants first by posts, then by number of cumulative votes, then by alphabetical order. See the getRankings function on line 14

  • Big refactor into typescript
  • Separated files by function
  • Added a bunch of new config files
  • Added the leaderboard function which supplies an output like:
## <center>Leaderboards</center>
Rank | User | Weeks | Votes
-|-|-|-
1 | @indy8phish | 4 | 117
2 | @nowplaying-music | 4 | 1330
3 | @anatolianwishdom | 4 | 39
4 | @bennettitalia | 4 | 768
5 | @majes.tytyty | 4 | 624
6 | @hanlovello | 4 | 234
...

That output looks like:
image.png

Now Playing

Check out the @nowplaying-music bot and contest in action and enter week 5



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Hey @walnut1 I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Release the Kraken! You got a 2.14% upvote from @seakraken courtesy of @walnut1!

This post has received a 8.23 % upvote from @aksdwi thanks to: @walnut1.

Coin Marketplace

STEEM 0.04
TRX 0.31
JST 0.076
BTC 63575.31
ETH 1665.10
USDT 1.00
SBD 0.42