How to Publish an npx Command to Improve productivity?
Introduction
Blog posting is kind of my knowledge base. I can review and apply knowledge from those posts to my new projects.
Building tools is another efficient way to create a new project without recalls or a few manual works. To integrate the knowledge, I create an npx tool to create a new project with Next.js, Redux, and Styled Components with default folders and files.
This topic is the note that now to create and publish a new npx tool to npm. There are two sections I will mention.
- Steps to push a new npx command
- Other useful commands to manage npm packages
- NPM package semantic versioning
Steps to push a new npx command
The target of the below steps is to create and publish an interactive npx command.
1. Create a new npm project
Type the following command in the terminal.