Skip to content
This repository has been archived by the owner on Feb 13, 2021. It is now read-only.

Commit

Permalink
Merge pull request prebid#113 in AOLP_ADS_JS/prebid.js from release/1…
Browse files Browse the repository at this point in the history
….25.0 to aolgithub-master

* commit '2a31c81b71595988ed2bf3470fb94d4fb75098bc': (71 commits)
  Sync with contrib/aol-adapter-aliases branch.
  Added junit reporter, improved browserstack tests running.
  Change browsers config to allow run tests on CI.
  Temporary comment unit test to provide compatibility with pre-bidder timeout feature.
  Added banner for minified source  file.
  Improve matching to avoid breaking js syntax.
  Changed changelog entry.
  Fixed invalid module link.
  Prebid 0.26.1 Release (prebid#1412)
  fix prebid#1410 - issue with ie and xhr.timeout (prebid#1411)
  Lint modules directory (prebid#1404)
  Added changelog entry.
  Added ids in aolPartnersIds.
  Added tests for delimiterLoader.
  Set outstream mediaType based on renderer in response (prebid#1391)
  Fixing the BidAdjustmentEvent fire time (prebid#1399)
  Improved adapter source code wrappig.
  Changed aol analytics adapter to new structure.
  Get rid of preserve keyword.
  Added preserved keyword for adapters wrapping.
  ...
  • Loading branch information
vzhukovsky committed Aug 10, 2017
2 parents f83a866 + 2a31c81 commit 2f74d10
Show file tree
Hide file tree
Showing 237 changed files with 9,235 additions and 5,645 deletions.
5 changes: 3 additions & 2 deletions .eslintrc → .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
module.exports = {
"env": {
"browser": true,
"commonjs": true
Expand All @@ -23,6 +23,7 @@
"camelcase": "off",
"eqeqeq": "off",
"import/first": "off",
"new-cap": "off",
"no-control-regex": "off",
"no-mixed-operators": "off",
"no-multiple-empty-lines": "off",
Expand All @@ -39,4 +40,4 @@
"standard/object-curly-even-spacing": "off",
"valid-typeof": "off"
}
}
};
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ build/coverage/

## Directory-based project format:
.idea/
.vscode/
# if you remove the above rule, at least ignore the following:

# User-specific stuff:
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.1
7.0
14 changes: 4 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
sudo: required
dist: trusty

language: node_js

node_js:
- "5.1"
- "7.0"

# See https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-the-Chrome-addon-in-the-headless-mode
addons:
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
chrome: stable

before_install:
- npm install -g gulp
- export CHROME_BIN=google-chrome
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost &

script:
- gulp run-tests
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
AOL Prebid 1.25.0
----------------
Updated to Prebid 0.26.1


AOL Prebid 1.24.0
----------------
Updated to Prebid 0.25.0
Expand Down
82 changes: 52 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,12 @@ Working examples can be found in [the developer docs](http://prebid.org/dev-docs
$ cd Prebid.js
$ yarn install

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

For more info, see [the Yarn documentation](https://yarnpkg.com).

*Note:* You need to have `NodeJS` 4.x or greater installed.

<a name="Build"></a>

## Build for Development
Expand All @@ -80,21 +82,13 @@ This runs some code quality checks, starts a web server at `http://localhost:999
+ `./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.
The standard build output contains all the available modules from within the `modules` folder.

For example, in `path/to/your/list-of-adapters.json`, write:
You might want to exclude some/most of them from the final bundle. To make sure the build only includes the modules you want, you can specify the modules to be included with the `--modules` CLI argument.

[
"openx",
"rubicon",
"sovrn"
]
For example, when running the serve command: `gulp serve --modules=openxBidAdapter,rubiconBidAdapter,sovrnBidAdapter`

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

Expand All @@ -104,26 +98,35 @@ Prebid now supports the `yarn` npm client. This is an alternative to using `npm`
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
$ gulp build --modules=openxBidAdapter,rubiconBidAdapter,sovrnBidAdapter
Alternatively, a `.json` file can be specified that contains a list of modules you would like to include.

$ gulp build --modules=modules.json
With `modules.json` containing the following
```json modules.json
[
"openxBidAdapter",
"rubiconBidAdapter",
"sovrnBidAdapter"
]
```

**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.js` as a `yarn` dependency of your project: `yarn add prebid.js`
- Duplicate `node_modules/prebid.js/adapters.json` to under your project path, e.g. `path/to/your/list-of-adapters.json`
- Remove the unnecessary adapters
- Run the `prebid.js` build under the `node_modules/prebid.js/` folder

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

Most likely your custom `prebid.js` will only change when there's:

- A change in your list of adapters
- A change in your list of modules
- A new release of `prebid.js`

Having said that, you are probably safe to check your custom bundle into your project. You can also generate it in your build process.
Expand All @@ -132,7 +135,26 @@ Having said that, you are probably safe to check your custom bundle into your pr

## Test locally

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

```bash
gulp lint
```

To run the unit tests:

```bash
gulp test
```

To generate and view the code coverage reports:

```bash
gulp test-coverage
gulp view-coverage
```

For end-to-end testing, 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`).
Expand Down Expand Up @@ -161,21 +183,21 @@ For deployment:
})();
```

To run the project locally, use:
Build and run the project locally with:

$ gulp serve
```bash
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.
This runs `lint` and `test`, then 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.
As you make code changes, the bundles will be rebuilt and the page reloaded automatically.

<a name="Contribute"></a>

Expand All @@ -189,7 +211,7 @@ Our PR review process can be found [here](https://github.com/prebid/Prebid.js/tr

### Add a Bidder Adapter

To add a bidder adapter, see the instructions in [How to add a bidder adaptor](http://prebid.org/dev-docs/bidder-adaptor.html).
To add a bidder adapter module, see the instructions in [How to add a bidder adaptor](http://prebid.org/dev-docs/bidder-adaptor.html).

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

Expand Down Expand Up @@ -225,7 +247,7 @@ For instructions on writing tests for Prebid.js, see [Testing Prebid.js](http://

### Supported Browsers

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

### Governance
Review our governance model [here](https://github.com/prebid/Prebid.js/tree/master/governance.md).
171 changes: 0 additions & 171 deletions adapters.json
Original file line number Diff line number Diff line change
@@ -1,171 +0,0 @@
[
"aardvark",
"adblade",
"adbund",
"adbutler",
"adequant",
"adform",
"adkernel",
"admedia",
"adyoulike",
"bidfluence",
"vertamedia",
"aol",
"appnexus",
"appnexusAst",
"beachfront",
"audienceNetwork",
"carambola",
"conversant",
"districtmDMX",
"fidelity",
"gumgum",
"hiromedia",
"indexExchange",
"innity",
"kruxlink",
"getintent",
"inneractive",
"komoona",
"lifestreet",
"mantis",
"openx",
"piximedia",
"pubmatic",
"pubgears",
"pulsepoint",
"pulsepointLite",
"quantcast",
"rhythmone",
"rubicon",
"smartyads",
"huddledmasses",
"smartadserver",
"sekindoUM",
"serverbid",
"sonobi",
"sovrn",
"springserve",
"thoughtleadr",
"stickyadstv",
"triplelift",
"twenga",
"yieldbot",
"nginad",
"brightcom",
"wideorbit",
"jcm",
"underdogmedia",
"memeglobal",
"criteo",
"centro",
"xhb",
"sharethrough",
"roxot",
"vertoz",
"widespace",
"admixer",
"atomx",
"tapsense",
"trion",
"eplanning",
"prebidServer",
"adsupply",
"cox",
{
"aol": {
"alias": "onemobile"
}
},
{
"aol": {
"alias": "onedisplay"
}
},
{
"appnexus": {
"alias": "brealtime"
}
},
{
"appnexus": {
"alias": "pagescience"
}
},
{
"appnexus": {
"alias": "defymedia"
}
},
{
"appnexus": {
"alias": "gourmetads"
}
},
{
"appnexusAst": {
"supportedMediaTypes": ["video", "native"]
}
},
{
"vertamedia": {
"supportedMediaTypes": ["video"]
}
},
{
"beachfront": {
"supportedMediaTypes": ["video"]
}
},
{
"appnexus": {
"alias": "matomy"
}
},
{
"rubicon": {
"alias": "rubiconLite",
"supportedMediaTypes": ["video"]
}
},
{
"appnexus": {
"alias": "featureforward"
}
},
{
"appnexus": {
"alias": "oftmedia"
}
},
{
"adkernel": {
"alias": "headbidding"
}
},
{
"getintent": {
"supportedMediaTypes" : ["video"]
}
},
{
"stickyadstv": {
"alias": "freewheel-ssp"
}
},
{
"rhythmone": {
"supportedMediaTypes": ["video"]
}
},
{
"admixer": {
"supportedMediaTypes": ["video"]
}
},
{
"conversant": {
"supportedMediaTypes": ["video"]
}
}
]
1 change: 0 additions & 1 deletion analytics.json
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
["aol"]
Loading

0 comments on commit 2f74d10

Please sign in to comment.