In this guide, we will discuss how we can create a javascript library and publish it to npm. In a previous post we had built a small script for creating a nested tree menu. We will convert that into a npm package here.

Step 1: Initialize the directory and the repo.

Let’s create a folder for the library…


While building a dashboard layout, I recently had a requirement for a nested tree menu. It would preferably have to support any arbitrary level of nesting. There were some packages available already like JSTree — but they were built to support a lot of extra functionalities like changing the menu…


Nginx access logs are a very important data source for web traffic analysis. Analysing these logs can provide us information like the frequency of hits to specific urls, traffic from specific ips etc. While this is useful by itself, for it to be a proper analytics datasource, it should also…


I am planning to do a series of posts where we will progressively build a demo ecommerce website using Flask, SQLAlchemy and React. The boilerplate repositories prepared for these posts might serve as useful starter kits for others. …


Web browsers have become increasingly very powerful over the past few years. Many features which were earlier offered only by mobile apps are now available on web as well. …


I had recently setup a Jupyterhub server for my company and wanted to blog about the same. Before we get into the setup instructions, it might be useful to have a brief overview of the Jupyter eco-system. When I started I was confused by the various terms which were being…


Google’s Waymo is a threat to Uber, but not just because it has the obvious head start in the autonomous car business. While that would indeed reduce Uber’s eventual market share in this segment, Waymo’s arrival also threatens Uber in a more fundamental way. In my opinion, it also threatens…


Recently I had to create some jupyter notebooks to analyse a database. Since the database credentials were not meant to be committed as part of the code, I decided to keep them as environment variables. And it turned out to be surprisingly tricky to access the environment variables in the…


So, China is moving to abolish term limits and essentially let Xi Jinping do a Mao if he prefers so.

https://www.nytimes.com/2018/02/25/world/asia/china-xi-jinping.html

On the one hand, this is sad and scary because I had really wanted to believe that CPC had become a very pragmatic and stable political organization which would…


When I kept the five rupee coin on the juice shop’s table, something felt different about it. On picking it up and checking it again, I realized it was not a 5 Rupee coin at all. It was a 20p coin from 1971! …

Surya Sankar

Entrepreneur, Full stack web developer, Product Manager. Dabbling with data science now. Interested in Economics, Politics and History.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store