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

prebid_adikteev

v0.24.0-pre

Published

Header Bidding Management Library

Readme

Build Status Percentage of issues still open Average time to resolve an issue Code Climate Coverage Status devDependencies Status

Prebid.js

A free and open source library for publishers to quickly implement header bidding.

This README is for developers who want to contribute to Prebid.js. For user-facing documentation, see Prebid.org.

Table of Contents

Install

$ git clone https://github.com/prebid/Prebid.js.git
$ cd Prebid.js
$ yarn install

Prebid now supports the yarn npm client. This is an alternative to using npm for package management, though npm will continue to work as before.

For more info about yarn see https://yarnpkg.com

Build for Dev

To build the project on your local machine, run:

$ gulp serve

This runs some code quality checks, starts a web server at http://localhost:9999 serving from the project root and generates the following files:

  • ./build/dev/prebid.js - Full source code for dev and debug
  • ./build/dev/prebid.js.map - Source map for dev and debug
  • ./build/dist/prebid.js - Minified production code
  • ./prebid.js_<version>.zip - Distributable zip archive

Note: You need to have node.js 4.x or greater installed to be able to run the gulp build commands.

Build Optimization

The standard build output contains all the available bidder adapters listed in adapters.json.

You might want to exclude some/most of them from the final bundle. To make sure the build only includes the adapters you want, you can make your own adapters file.

For example, in path/to/your/list-of-adapters.json, write:

    [
        "openx",
        "rubicon",
        "sovrn"
    ]

Building with just these adapters will result in a smaller bundle which should allow your pages to load faster.

Build standalone prebid.js Prebid now supports the yarn npm client. This is an alternative to using npm for package management, though npm will continue to work as before.

For more info about yarn see https://yarnpkg.com

  • Clone the repo, run yarn install

  • Duplicate adapters.json to e.g. list-of-adapters.json

  • Remove the unnecessary adapters from list-of-adapters.json

  • Then run the build:

      $ gulp build --adapters path/to/your/list-of-adapters.json

Build prebid.js using Yarn for bundling

In case you'd like to explicitly show that your project uses prebid.js and want a reproducible build, consider adding it as an yarn dependency.

  • Add prebid_adikteev as a yarn dependency of your project: yarn add prebid_adikteev

  • Edit the adapters list in path/to/your/list-of-adapters.json

  • Run the prebid_adikteev build under the node_modules/prebid_adikteev/ folder

      $ gulp build --adapters path/to/your/list-of-adapters.json

Most likely your custom prebid_adikteev will only change when there's:

  • A change in your list of adapters
  • A new release of prebid_adikteev

Having said that, you are probably safe to check your custom bundle into your project. You can also generate it in your build process.

Test locally

To configure Prebid.js to run locally, edit the example file ./integrationExamples/gpt/pbjs_example_gpt.html:

  1. Change {id} values appropriately to set up ad units and bidders
  2. Set the path to Prebid.js in your example file as shown below (see pbs.src).

For development:

(function() {
    var d = document, pbs = d.createElement('script'), pro = d.location.protocol;
    pbs.type = 'text/javascript';
    pbs.src = ((pro === 'https:') ? 'https' : 'http') + './build/dev/prebid.js';
    var target = document.getElementsByTagName('head')[0];
    target.insertBefore(pbs, target.firstChild);
})();

For deployment:

(function() {
    var d = document, pbs = d.createElement('script'), pro = d.location.protocol;
    pbs.type = 'text/javascript';
    pbs.src = ((pro === 'https:') ? 'https' : 'http') + './build/dist/prebid.js';
    var target = document.getElementsByTagName('head')[0];
    target.insertBefore(pbs, target.firstChild);
})();

To run the project locally, use:

$ gulp serve

This runs code quality checks, generates all the necessary files and starts a web server at http://localhost:9999 serving from the project root. Navigate to your example implementation to test, and if your prebid.js file is sourced from the ./build/dev directory you will have sourcemaps available in your browser's developer tools.

To run the example file, go to:

  • http://localhost:9999/integrationExamples/gpt/pbjs_example_gpt.html

To view a test coverage report, go to:

  • http://localhost:9999/build/coverage/karma_html/report

A watch is also in place that will run continuous tests in the terminal as you edit code and tests.

Contribute

Many SSPs, bidders, and publishers have contributed to this project. 60+ Bidders are supported by Prebid.js.

Our PR review process can be found here.

Add a Bidder Adapter

To add a bidder adapter, see the instructions in How to add a bidder adaptor.

Please do NOT load Prebid.js inside your adapter. If you do this, we will reject or remove your adapter as appropriate.

Code Quality

Code quality is defined by .jscs and .jshint files and errors are reported in the terminal.

If you are contributing code, you should configure your editor with the provided .jscs and .jshint settings.

Unit Testing with Karma

    $ gulp test --watch

This will run tests and keep the Karma test browser open. If your prebid.js file is sourced from the ./build/dev directory you will also have sourcemaps available when using your browser's developer tools.

  • To access the Karma debug page, go to http://localhost:9876/debug.html

  • For test results, see the console

  • To set breakpoints in source code, see the developer tools

Detailed code coverage reporting can be generated explicitly with

    $ gulp test --coverage

The results will be in

    ./build/coverage

Note: Starting in June 2016, all pull requests to Prebid.js need to include tests with greater than 80% code coverage before they can be merged. For more information, see #421.

For instructions on writing tests for Prebid.js, see Testing Prebid.js.

Supported Browsers

Prebid.js is supported on IE9+ and modern browsers.

Governance

Review our governance model here.