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

auto-wa-rapiwha

v2.9.0

Published

![](https://edge.furret.codes/f/nodejs-package-template-preview.png)

Downloads

20

Readme

NodeJS Package Template on Replit

This is the best, fastest scaffolding to getting started on your next NodeJS package on Replit! Quickly write your code in Typescript or Javascript using the latest NodeJS version (NodeJS v18.2.0), build and bundle your code with bundlers, and test your code in multiple environments with Jest. No setup required!

Development

You can write your package using Typescript or ESM, visit the /src and start scripting.

You can install packages with Yarn.

$ yarn add [package]

More Resources


Tooling

There are also several utility scripts to help make your code neater and check for errors.

Linting

This template uses a preconfigured ESLint linter to scan for code errors. You can easily run ESLint via:

$ yarn lint # to check for errors
$ yarn lint:fix # to fix fixable errors

Formatting

This template uses a preconfigured Prettier formatter to scan for style issues. You can easily run Prettier via:

$ yarn format # to check for style issues
$ yarn format:fix # to fix style issues

Building

To build your code, this template uses the Rollup bundler and a preconfigured build file which also utilizes the build Babel environment specified in the Babel config file. You can build your package via:

$ yarn build

This will generate a CommonJS output, an ESM output, and a type declaration file (if you're using Typescript) in the /dist folder. The package.json file has already been configured to export these files for your convinence.

More Information


Testing

This template uses Jest to run unit tests on each of the build files. To run all tests click the run button or run:

$ yarn test

You can run specific tests as well:

$ yarn test:common # /tests/common.test.js
$ yarn test:esm # /tests/esm.test.js
$ yarn test:ts # /tests/typescript.test.js

All files are transpiled to run in specified environment found in the test Babel environment in the Babel config file. This means you can write CommonJS and ESM files ending in .js and Jest will find and test them. Jest will also test Typescript files ending in .ts so you can write tests in Typescript as well.

More Information


Community

This template has a preconfigured package.json which you can fill out with details about Github repositories, main websites and more. It also has Licensing (MIT License by default), Code of Conduct, and Contributing information so you can easily push to your code to the open source community.

More Information