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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@highfivve/ad-tag

v5.7.2

Published

An ad tag implementation called moli

Readme

Ad Tag Library

This library provides a set of components to orchestrate Google Ad Manager (GAM), Prebid and Amazon TAM.

Building a bundle

An ad tag bundle is a set of modules bundled together in a single javascript file. This file can be included in a website to display ads. In order to create a bundle you need

  1. A JSON configuration file that contains the modules that should be included. All modules are in ad-tag/source/ts/bundle. You can find examples bundles in bundles.
  2. This repository cloned and installed at the version you want to build.

Then run

npm ci
export NODE_ENV=production
npx ts-node bundle.ts --output adtag.mjs --config <path-to-config.json>

This will generate an ES6 bundle.

!! If you are using node.js 17+ you currently need to do this !!

export NODE_OPTIONS=--openssl-legacy-provider

See https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported

Authentication

See github docs on authentication

Add the .npmrc file to publisher project, so that we can install the package from the github npm registry. As long as we have a private github repository we need to add the authToken (currently personal token).

@highfivve:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken={TOKEN}
always-auth=true
registry=https://registry.npmjs.org

I recommend putting this under ~/.npmrc as described in the npmrc documentation

Developing

You require npm for developing.

npm run setup

Running tests

You can run tests with

npm test

If you do run tests in your IDE, you need to make sure that those two parameters are added to the Mocha runner

--require ts-node/register --require tsconfig-paths/register

The tsconfig-paths package is necessary to support the compilerOptions.paths in the tsconfig.json, which allow for more concise imports.

For intellij see https://www.jetbrains.com/help/idea/running-unit-tests-on-typescript.html#mocha

Examples

In order to run the examples you must create a production build of the modules.

npm run build:watch

Testing with examples

If you want to test code changes within the examples you have to start the module in watch mode.

# rebuild the module you change, e.g. ad-tag
cd examples/esbuild
npm start

Styles

The ad tag offers a set of styles that can be included in your project. You can build the styles with

# if you haven't run setup:dev before
npm run setup:css:defaults
npm run build:css

Styles will appear in the dist folder.

Overriding styles

You can override styles by changing the files

The variables are split in different :root sections, so that cssnano can deduplicate identical rules.

You can create the default styles with

npm run setup:css:defaults

Console

You can build and test the console locally with

npm run build:console:watch

Then you can start the esbuild example with

cd examples/esbuild
npm start

Open your browser at localhost:8080 , open your javascript console and run

moli.openConsole('console.js');

Release

Releases are automatically prepared and publish via github actions. To trigger a release run

npm run release

There will always be a release draft on the github release page. Pick the version the release drafter suggests.