Software tools written in Node.js

Using Git submodules to streamline Node.js package development

(Mon Dec 13 2021 00:00:00 GMT+0200 (Eastern European Standard Time)) When developing a Node.js package, we typically create a test application with which to exercise the package. That means for every source code change in the package, we must reinstall the package into the node_modules directory of the test application, which can be very frustrating. Git's submodule feature can streamline this by letting you directly edit both the test application and package with no reinstalls required.

How to use npm/yarn/Node.js package.json scripts as your build tool

(Tue Sep 01 2020 00:00:00 GMT+0300 (Eastern European Summer Time)) To Node.js the package.json simply tracks a few things about a package like its main module. To npm and yarn this file serves more purposes, from package management data, to dependencies lists, to package installation and project management scripts. The scripts tag may have a humble originating purpose, but by overusing it package.json becomes powerful platform for running command-line software processes like building websites or building software products.

Resizing images using Node.js image processing tools, without external dependencies or image servers

(Wed Sep 18 2019 00:00:00 GMT+0300 (Eastern European Summer Time)) While getting ready to post a set of images on another blog, I wondered how to most effectively resize the images. They were high resolution product images that came with a press release, and to be nice to my readers it's important to shrink the image size to promote faster downloads. What if I want to supply several image sizes based on the device used by the visitor? It's not enough to resize the image on my own, it would be better to generate several image sizes. Which led to exploring Node.js tools for resizing images, and finding them lacking.

Simplify your npm publish workflow using Github Actions

(Thu Sep 12 2019 00:00:00 GMT+0300 (Eastern European Summer Time)) Github's recently added new feature, Github Actions, promises us a powerful Workflow system to handle a huge range of tasks. Those of us who publish Node.js packages can use Actions to automatically run tests and then publish the package to npm. Let us see how to use Github Actions to simplify our lives.

How to install NAVE, an alternative Node.js version manager to nvm

(Thu Jul 25 2019 00:00:00 GMT+0300 (Eastern European Summer Time)) Those of us wanting to keep up with the latest Node.js version, or to test our code on alternative Node.js versions, probably have installed nvm. It is an easy-to-use tool for quickly installing the latest Node.js version, or to easily switch between Node.js versions to test our code. But nvm doesn't fit all use cases, and that's where nave comes in. Its purpose is extremely similar to nvm, but it satisfies a slightly different set of use cases that one may find interesting.

Automating Node.js/JavaScript code quality checks with eslint

(Thu Dec 21 2017 00:00:00 GMT+0200 (Eastern European Standard Time))

With eslint, coders can save a lot of time (in theory) by checking code for simple (but hard to find) errors. Take a function where you typed one parameter name, and used a different name, and then your unit testing did not touch that function. You'll find that error after a customer reports a bug. With eslint such an error can be caught before shipping the code.

Yarn versus npm, what's the big deal?

(Wed Sep 20 2017 00:00:00 GMT+0300 (Eastern European Summer Time)) A couple years ago Yarn came onto the Node.js scene promising to be a better npm than npm. Apparently a lot of people have taken to Yarn, given the frequency with which I see instructions to install packages using Yarn. Since npm is installed along with Node.js, and since Yarn just uses the npm package repository, I'm left wondering what all the fuss is about Yarn. If it's just doing the same thing as npm then what is its reason to exist? What advantage does Yarn have over npm? Let's take a look.