JavaScript tutorial: Build and publish NPM packages in a pinch

With @pika/pack, you can automatically optimize for ES2018, Node.js, web, and build types with minimal configuration

There have been a handful of times when I thought it would be nice to publish a JavaScript library on NPM. It was either a small library I kept using in different projects or a command-line tool I thought was useful enough to share with coworkers. But every time I started researching the process of building and publishing packages to NPM, I would invariably become overwhelmed.

After going down the rabbit holes of best practices and support I realized that my afternoon project just cascaded into the evening, and then into the night. If I did make any headway, I was never sure of it. I was constantly asking myself, “Am I really doing this right?”

When a former coworker asked if I had ever used @pika/pack, a new tool designed to do all of the heavy lifting for building and publishing NPM packages, I jumped at the opportunity. This past week I took @pika/pack for a test run by creating and publishing a simple CLI tool.

What is @pika/pack?

To continue reading this article register now