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

@tapjs/config

v5.0.0

Published

Utility loading and managing tap configuration

Downloads

544,262

Readme

@tapjs/config

This is the library that tap uses to manage configuration coming from the command line options, environment variables, and config files.

Configuring Node Tap

If a TAP_RCFILE value is set in the process environment, then that will be the initial location that tap looks for configuration values.

If that's not set, then tap will look for configuration data first in a .taprc file in the project root, and then in the "tap" object in the project package.json file. ('Project root' means the nearest folder at or above the current working directory containing package.json, .taprc, or .git.)

The config object may set any of the following fields, as well as the special "extends" field, which may specify either a package name or file name, relative to the config file that references it.

If the "extends" field resolves to a file on disk, then that will be read as the base configuration object. (It may also extend yet another config file, and so on.)

If the "extends" field specifies a package name, then it must be resolveable in the node_modules folder of the file extending it. That package must contain either a .taprc file, or a package.json file with a "tap" object.

To see the format used in a .taprc file, run the tap dump-config command with the desired options specified on the command line.

Additionally, all config options that are modified from their defaults will be set in the environment with the TAP_ prefix, and will be read from the environment if so specified. For example, specifying --omit-version on the command line, or omit-version: true in a .taprc file, will set TAP_OMIT_VERSION=1 in the environment.

Environment and CLI options take priority over any config files.

Class TapConfig

This is the main interface for dealing with tap configuration.

The typical way to use this is by calling await TapConfig.load() to get a LoadedConfig object, which is an instance of TapConfig that has been fully loaded with all relevant settings.

The full list of methods and properties are available in the typedocs