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

outer-api-nfsw

v1.1.0

Published

outer api nfsw package.

Downloads

2

Readme

A basic, production ready NPM package skeleton.

How to use

Create a GitHub repository and download

Click the "Use this template" button and then clone your newly created repo to your machine with the command (inside your local dev directory):

git clone [email protected]:<YourGitHubUsername>/<RepoName>.git

// eg. git clone [email protected]:DanielWinning/node-package-template.git

Then cd into the new directory.

Edit package.json

Inside your projects package.json file, change the following line to <your-npm-username>/<package-name>. You can preface your vendor name (the first part) with an @ to make this a scoped package:

"name": "@my-org/node-package-template"

Run npm commands

Now run npm install && npm run build to install the required dev dependencies and compile the example code.

Remove example code

You can work on your package inside the src directory, currently src/index.js just exports the HelloWorld class from src/HelloWorld.js, which you can delete and add your own code. You can watch for changes with the npm run watch command and compile for production with the npm run build command.

Testing package before publishing

To test your package inside a project before publishing to NPM, you can use npm link to create a symbolic link to your package.

In the root of your package (same level as package.json), run:

npm link

Inside the project you want to test your package in, run:

npm link vendor/package-name

Now you can test your package - see the example below, this is how we would use the HelloWorld class inside our real world project:

import { HelloWorld } from "@my-org/node-package-template";

console.log(HelloWorld.greetWorld());

Added TDD

It's good practice to use Test Driven Development, so I've included jest. Write your tests inside the tests directory - an example using the HelloWorld class has been included. Run the command npm test to run your tests.

Publishing your package

When you're happy that your package is ready to be released into the wild, simply run npm publish or npm publish --access public if your package is scoped.