How to create your own personal npm business card

Image for post
Image for post

Have you ever thought about creating and publishing an npm package named like you? To be honest, I haven’t thought about that and had no use-case for it until I came across this tweet of Max Stoiber:

My first thought: “Damn, why haven’t I thought about that too!”.

After reading some of the replies, I found the original repository from Tierney Cyren with his npm card he and others forked from. There’s even a create-my-card module available already.

Create your own npm card

You either fork Tierney’s code or one of the many other forks (eg. here’s mine).

As soon as you’ve cloned the repository onto your local computer edit ./bin/card.js:

So much for the card.js file. Once you’ve saved it check in the file again. Before you share the card with the rest of the world, there’s one last thing to do:

Okay, now we are ready. Create a new version and publish the package:

  • $ npm version minor (will create a new minor version of your package, eg. 0.1.0 -> 0.2.0)
  • $ npm publish

And voila, your package is online and others can use it now. Awesome!

For instance, here’s mine: https://github.com/natterstefan/businesscard

$ npx natterstefan

So next time you are at a conference, networking event or you are a speaker you can simply share this command with other developers and present your next level business card. 😅

PS: Share your npm business card with me on twitter: https://twitter.com/natterstefan.

Written by

I am a Software Engineer from Austria 🇦🇹. I write about JavaScript, TypeScript, ReactJS and NodeJS. 📧 Weekly NL Series: https://newsletter.natterstefan.me

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