Image for post
Image for post
NPM Packages (Source: https://www.npmjs.com/)

If you use NPM in your day-to-day workflow, I’m sure you will like these tips.

Generating your package.json

We usually do npm init and then start adding the information that npm requests. But, if we don’t really care about all that info and we want to leave the defaults we then press enter for every single piece of data requested by npm. To avoid that, you can just type npm init -y . This is the no questions asked version.

Installing modules

Instead of typing npm install you can simply do npm i

Installing several modules at once

Instead of typing one npm install command for each module you need…


Image for post
Image for post

While developing applications, learning to use a library or just testing out something quick, you might encounter the need to host your files in a “static” server — meaning that you just need an HTTP server to serve files as-is from a directory — . Nowadays, there are several simple options to get a static server running quickly, and that’s what I’m covering in this article.

For all of the options below that use the command line, I’m assuming that you already entered the folder where your files are located. For example, if your code is in the folder “project”


I’ve seen a lot of people interested in learning a new language, but most of them don’t do it because they are intimidated about the language itself thinking it’s very complicated or thinking it could be expensive to learn.

Those are fair concerns and, depending on the language you want to learn and/or your native language, it could probably become more complicated to learn one language than other. But there’s only one way to know: by doing it!

Some background on why the traditional way was not really great for me

I am from Ecuador and my native language is Spanish. I learned English when I was 14 years old (30 years ago)…


Image for post
Image for post
Nuxt Logo

I recently wanted to use the nullish coalescing operator in the code of my Nuxt application. Of course, I needed to include the Babel plugin in order to support that, but for some reason I couldn’t find how to do that right away. Thus, I’m writing this brief guide to have it as a reference for myself and for anybody else that needs to do it in the future.

The first thing to do is to install the babel plugin with npm to enable the usage of the nullish coalescing operator

npm install --save-dev @babel/plugin-syntax-nullish-coalescing-operator

Once you have that, according…


Image for post
Image for post
cowsay package output

First off, some context

We’ve been using NPM for a long time now and despite the fact it is very useful, it can also be a little bit annoying from time to time, especially when you want to try some new packages but they need you to install them globally and you don’t want to do so (I like to keep globally installed on my computer only the packages that I know I will use all the time).

Say for example, you want to test the Angular framework. It comes with a great utility called the angular-cli, which helps you speeding up your workflow…


Image for post
Image for post
NPM (Source: npmjs.com)

There’s a recurring question I get asked about how to run NPM modules that are installed locally in your project without the need to install them globally.

This happens a lot with tools like gulp, webpack, create-react-app, etc. that usually in their docs suggest you install them globally so you can easily use them, but you don’t need to do this if you don’t want/can’t.

In this article, I am going to list the options we have for achieving this (from what I know, of course). I’ll be using the webpack package for the examples, so each option assumes that…


Image for post
Image for post

Today I stumbled upon this simple library called Sentinel.JS that allows us to detect new DOM elements added to the DOM tree.

This is a task that can be accomplished using the Mutation Observer interface, but this library makes it pretty simple and that’s what I like about it. This is what the creator of the library says about its implementation:

SentinelJS uses dynamically-defined CSS animation rules (@keyframes) to hook into browser animationstart events when a new node matching a given CSS selector is added to the DOM. …

Jair Reina

Software Engineer - VP Architect @Digitas

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