npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

kelmbrueschke-resume

v1.0.1

Published

practice with npm

Downloads

1

Readme

Npm Resume For this exercise we're going to create our own npm package that will print out your resume. the cool thing about this is that anyone can install your code and print out a resume from their console!

Steps Go ahead and create/change into a new directory called resume in your exercises or sandbox folder.

In order to publish anything to npm, we have to sign up/login with npm.

You can type npm whoami to see if npm recognizes you as logged in. (Most likely you are not) To sign up, you can type npm login and choose a name and password. You can also do this through their site npmjs. Lastly you will also need to verify your email account. Once you've signed up, type in npm init to create a package.json file. The only two required fields are name and version

The package name should be something like yourname-resume (You have to pick a name that hasn't been taken - you can search npm's site to see what's available) Version should follow this format x.x.x (I recommend putting 1.0.0) For test_command and entry_point you can just hit enter. For license, you can use ISC Fill in the rest fields the best you can. It's ok if you don't know what to put. You can just hit enter, and you can always edit everything later. Now create 3 files - index.js, readme.md, info.json

On the first line of index.js add...

#! /usr/bin/env node This is a little strange looking, but will allow us to run our code globally as well as from the command line later.

For more info on the Shebang

Next add... const fs = require('fs')

fs.readFile(__dirname + '/info.json', 'utf8', function(err, data) { if (err) { console.log(err) } else { console.log(data) return data } }) fs (short for File System) is part of node that we are bringing in to allow us to more easily and reliably read what directory we are in. __dirname is the directory we are currently in readFile gives us back the contents of a file. We are passing in 3 arguments... the file we want to read the way to encode that file a callback function if there is an error getting the file, print the error, else, print out and return the content. Next add the following to your package.json file. We're adding in a command that someone who's downloaded your npm file can run to display your resume. "bin": { "your-command-here": "./index.js" }, Hard part over!!

In info.json create a json object that's a short resume for yourself. Note: json wants property names and strings to be wrapped in "double quotes"! There are a few other differences as well that separate it from a javascript object You can use my resume as a guide. Yours can be shorter, or sillier, whatever you want! Feel free to add in more properties like interests, soft-skills, pets, etc...

{ "name": "Kelm Brueschke", "address": "Urbandale, IA/", "current-employer": "John Deere Financial", "work-email": "[email protected]", "email": "[email protected]", "resume": "", "proficientTechnologies": [ "Javascript", "React", "CSS", "COBOL", "CICS", "JCL" ], "otherSkills": [ "Fireworks", "Pyrotechnics", "Special Effects" ] }

Update your readme to be a short description about what you've made

git init, add, and commit.

Then create a new github repository Link your local file to the github repository (use git remote!) push up your repo! Ok, finally - run npm publish

You should be able to see your site and your readme on the npmjs site under your profile. To update you can just call npm publish again, but you first need to change the version number!

To test that everything worked, change into a different directory and run npm i -g name-of-project. Then run your-command-here

You can also download eachother's npm resumes and print them out! 🌟BONUS!🌟 Checkout Color.js to make your resume different colors! Use JSON.parse to create your resume as a javascript object you can loop through and customize more!